Richard's wijzigings voorstellen #189

Merged
OpzekerIT merged 3 commits from dev into main 2025-02-18 15:17:43 +00:00
5 changed files with 17 additions and 13 deletions

View file

@ -9,10 +9,9 @@ if ($host == 'dev.dtch.online') {
<a href="index.php" class="active">Home</a> <a href="index.php" class="active">Home</a>
<div id="myLinks"> <div id="myLinks">
<a href="last_stats.php">Last month %</a> <a href="last_stats.php">Last quarter %</a>
<a href="latestmatches.php">Last Matches</a> <a href="latestmatches.php">Last Matches</a>
<a href="topstatsavg.php">Match % T10</a> <a href="topstats.php">Top20</a>
<a href="topstats.php">Top10</a>
<a href="user_stats.php">User Stats</a> <a href="user_stats.php">User Stats</a>
</div> </div>
<a href="javascript:void(0);" class="icon" onclick="myFunction()"> <a href="javascript:void(0);" class="icon" onclick="myFunction()">

View file

@ -28,8 +28,13 @@ body {
font-size: 14px; font-size: 14px;
} }
th:nth-child(4), td:nth-child(4), th:nth-child(9), td:nth-child(9) { th:nth-child(1), td:nth-child(1), /* Player */
display: none; th:nth-child(2), td:nth-child(2), /* winrato */
th:nth-child(3), td:nth-child(3), /* win% */
th:nth-child(4), td:nth-child(4), /* kdh% */
th:nth-child(8), td:nth-child(8) /* matches */
{
display: table-cell;
} }
header .banner { header .banner {

View file

@ -54,8 +54,8 @@ $ogDescription = "Explore detailed player statistics over the past month includi
echo "<table border='1' class='sortable'>"; echo "<table border='1' class='sortable'>";
echo "<tr> echo "<tr>
<th>Player</th> <th>Player</th>
<th>AHD</th>
<th>Win %</th> <th>Win %</th>
<th>AHD</th>
<th>K/D Human</th> <th>K/D Human</th>
<th>Human Kills</th> <th>Human Kills</th>
<th>K/D All</th> <th>K/D All</th>
@ -135,8 +135,8 @@ $ogDescription = "Explore detailed player statistics over the past month includi
echo "<tr> echo "<tr>
<td><a href='latestmatches.php?selected_player=$player_name'>$player_name</a></td> <td><a href='latestmatches.php?selected_player=$player_name'>$player_name</a></td>
<td><a href='latestmatches.php?selected_player=$player_name'>$ahd</a></td>
<td><a href='latestmatches.php?selected_player=$player_name'>$winratio</a></td> <td><a href='latestmatches.php?selected_player=$player_name'>$winratio</a></td>
<td><a href='latestmatches.php?selected_player=$player_name'>$ahd</a></td>
<td><a href='latestmatches.php?selected_player=$player_name'>$KD_H</a></td> <td><a href='latestmatches.php?selected_player=$player_name'>$KD_H</a></td>
<td><a href='latestmatches.php?selected_player=$player_name'>$humankills</a></td> <td><a href='latestmatches.php?selected_player=$player_name'>$humankills</a></td>
<td><a href='latestmatches.php?selected_player=$player_name'>$KD_ALL</a></td> <td><a href='latestmatches.php?selected_player=$player_name'>$KD_ALL</a></td>

View file

@ -1,6 +1,6 @@
<?php <?php
$ogDescription = "Check out the top 10 PUBG player rankings in key performance categories! Explore leaderboards for metrics like damage dealt, headshot kills, and more across different game modes. Stay on top of the competitive scene and see where you or your favorite players stand in our regularly updated stats."; $ogDescription = "Check out the top 20 PUBG player rankings in key performance categories! Explore leaderboards for metrics like damage dealt, headshot kills, and more across different game modes. Stay on top of the competitive scene and see where you or your favorite players stand in our regularly updated stats.";
?> ?>
@ -31,10 +31,10 @@ include './includes/header.php';
<input type='submit' name='game_mode' value='squad' class='btn'> <input type='submit' name='game_mode' value='squad' class='btn'>
</form><br>"; </form><br>";
// Displaying top 10 comparisons for each attribute // Displaying top 20 comparisons for each attribute
$attributes = ['wins','top10s','kills','dBNOs','damageDealt','headshotKills','roadKills','teamKills','roundMostKills']; $attributes = ['wins','top10s','kills','dBNOs','damageDealt','headshotKills','roadKills','teamKills','roundMostKills'];
foreach ($attributes as $attribute) { foreach ($attributes as $attribute) {
echo "<h3>Top 10 $attribute</h3>"; echo "<h3>Top 20 $attribute</h3>";
uasort($players_data[$selected_mode], function ($a, $b) use ($attribute) { uasort($players_data[$selected_mode], function ($a, $b) use ($attribute) {
$account_id_a = array_key_first($a); $account_id_a = array_key_first($a);
$account_id_b = array_key_first($b); $account_id_b = array_key_first($b);
@ -45,7 +45,7 @@ include './includes/header.php';
echo "<tr><th>Player</th><th>$attribute</th></tr>"; echo "<tr><th>Player</th><th>$attribute</th></tr>";
$count = 0; $count = 0;
foreach ($players_data[$selected_mode] as $player_name => $player_details) { foreach ($players_data[$selected_mode] as $player_name => $player_details) {
if ($count++ >= 10) break; // Limit to top 10 players if ($count++ >= 20) break; // Limit to top 20 players
$account_id = array_key_first($player_details); $account_id = array_key_first($player_details);
echo "<tr><td>$player_name</td><td>{$player_details[$account_id][$attribute]}</td></tr>"; echo "<tr><td>$player_name</td><td>{$player_details[$account_id][$attribute]}</td></tr>";
} }

View file

@ -227,8 +227,8 @@ function Get-MatchStatsPlayer {
kills = $kills kills = $kills
humankills = $humankills humankills = $humankills
matches = $player_matches matches = $player_matches
KD_H = $humankills / ($deaths + $alives) # KD_Human calculated per match (kills / (deaths + alives)) KD_H = $humankills / $deaths
KD_ALL = $kills / ($deaths + $alives) # KD_ALL calculated per match (kills / (deaths + alives)) KD_ALL = $kills / $deaths
winratio = $winratio winratio = $winratio
wins = $player_wins wins = $player_wins
dbno = $dbno dbno = $dbno