Merge pull request #203 from OpzekerIT/dev
Alts in report maar niet in stats
This commit is contained in:
commit
ee4e07687f
2 changed files with 12 additions and 3 deletions
|
|
@ -13,6 +13,11 @@
|
||||||
"THAIlux",
|
"THAIlux",
|
||||||
"Reijn7000",
|
"Reijn7000",
|
||||||
"McPikkie",
|
"McPikkie",
|
||||||
"Brabo-Gamer"
|
"Brabo-Gamer",
|
||||||
|
"Squadkiller101"
|
||||||
|
|
||||||
|
],
|
||||||
|
"alts": [
|
||||||
|
"Squadkiller101"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,8 @@ $ogDescription = "Explore detailed player statistics over the past month includi
|
||||||
<h2>Player Stats past Quarter</h2>
|
<h2>Player Stats past Quarter</h2>
|
||||||
<?php
|
<?php
|
||||||
include './config/config.php';
|
include './config/config.php';
|
||||||
|
$clanmembers = json_decode(file_get_contents('./config/clanmembers.json'), true);
|
||||||
|
$alts = $clanmembers['alts'];
|
||||||
$players_matches = json_decode(file_get_contents('./data/player_last_stats.json'), true);
|
$players_matches = json_decode(file_get_contents('./data/player_last_stats.json'), true);
|
||||||
|
|
||||||
foreach ($players_matches as $key => $player_datas) {
|
foreach ($players_matches as $key => $player_datas) {
|
||||||
|
|
@ -71,7 +72,10 @@ $ogDescription = "Explore detailed player statistics over the past month includi
|
||||||
if (!isset($player_data['playername']) || is_null($player_data['playername'])) {
|
if (!isset($player_data['playername']) || is_null($player_data['playername'])) {
|
||||||
continue; // Skip this iteration and move to the next
|
continue; // Skip this iteration and move to the next
|
||||||
}
|
}
|
||||||
|
if (in_array($player_data['playername'], $alts)) {
|
||||||
|
continue; // Skip alt players
|
||||||
|
}
|
||||||
|
|
||||||
if ($key == 'all' && $player_data['matches'] < 25) {
|
if ($key == 'all' && $player_data['matches'] < 25) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue