Merge pull request #189 from OpzekerIT/dev

Richard's wijzigings voorstellen
This commit is contained in:
Lanta 2025-02-18 16:17:43 +01:00 committed by GitHub
commit d603041df4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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>
<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="topstatsavg.php">Match % T10</a>
<a href="topstats.php">Top10</a>
<a href="topstats.php">Top20</a>
<a href="user_stats.php">User Stats</a>
</div>
<a href="javascript:void(0);" class="icon" onclick="myFunction()">

View file

@ -28,8 +28,13 @@ body {
font-size: 14px;
}
th:nth-child(4), td:nth-child(4), th:nth-child(9), td:nth-child(9) {
display: none;
th:nth-child(1), td:nth-child(1), /* Player */
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 {

View file

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

View file

@ -1,6 +1,6 @@
<?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'>
</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'];
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) {
$account_id_a = array_key_first($a);
$account_id_b = array_key_first($b);
@ -45,7 +45,7 @@ include './includes/header.php';
echo "<tr><th>Player</th><th>$attribute</th></tr>";
$count = 0;
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);
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
humankills = $humankills
matches = $player_matches
KD_H = $humankills / ($deaths + $alives) # KD_Human calculated per match (kills / (deaths + alives))
KD_ALL = $kills / ($deaths + $alives) # KD_ALL calculated per match (kills / (deaths + alives))
KD_H = $humankills / $deaths
KD_ALL = $kills / $deaths
winratio = $winratio
wins = $player_wins
dbno = $dbno