commit
db27d46266
3 changed files with 41 additions and 39 deletions
|
|
@ -12,7 +12,5 @@
|
||||||
<meta property="og:title" content="DTCH CLAN">
|
<meta property="og:title" content="DTCH CLAN">
|
||||||
<meta property="og:description" content="DTCH CLAN STATS">
|
<meta property="og:description" content="DTCH CLAN STATS">
|
||||||
<meta property="og:image" content="https://dtch.online/images/logo.png">
|
<meta property="og:image" content="https://dtch.online/images/logo.png">
|
||||||
|
|
||||||
|
|
||||||
<script src="./lib/sorttable.js"></script>
|
<script src="./lib/sorttable.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
||||||
76
index.php
76
index.php
|
|
@ -27,48 +27,52 @@ $lastMatches = array_slice($allMatches, 0, 8);
|
||||||
<?php include './includes/head.php'; ?>
|
<?php include './includes/head.php'; ?>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<?php
|
<?php
|
||||||
include './includes/navigation.php';
|
include './includes/navigation.php';
|
||||||
include './includes/header.php';
|
include './includes/header.php';
|
||||||
?>
|
?>
|
||||||
<main>
|
<main>
|
||||||
<section>
|
<section>
|
||||||
<h2>Latest Matches</h2>
|
<h2>Latest Matches</h2>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
|
|
||||||
<tr>
|
|
||||||
<!-- <th>Match Date</th> -->
|
|
||||||
<th>Player Name</th>
|
|
||||||
<th>Mode</th>
|
|
||||||
<th>Type</th>
|
|
||||||
<th>Map</th>
|
|
||||||
<th>Kills</th>
|
|
||||||
<th>Damage</th>
|
|
||||||
<th>Place</th>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
|
||||||
$mapNames = array(
|
|
||||||
"Baltic_Main" => "Erangel",
|
|
||||||
"Chimera_Main" => "Paramo",
|
|
||||||
"Desert_Main" => "Miramar",
|
|
||||||
"DihorOtok_Main" => "Vikendi",
|
|
||||||
"Erangel_Main" => "Erangel",
|
|
||||||
"Heaven_Main" => "Haven",
|
|
||||||
"Kiki_Main" => "Deston",
|
|
||||||
"Range_Main" => "Camp Jackal",
|
|
||||||
"Savage_Main" => "Sanhok",
|
|
||||||
"Summerland_Main" => "Karakin",
|
|
||||||
"Tiger_Main" => "Taego"
|
|
||||||
);
|
|
||||||
|
|
||||||
foreach ($lastMatches as $match) {
|
<tr>
|
||||||
$matchid = $match['id'];
|
<th>Player Name</th>
|
||||||
|
<th>Match Date</th>
|
||||||
|
<th>Mode</th>
|
||||||
|
<th>Type</th>
|
||||||
|
<th>Map</th>
|
||||||
|
<th>Kills</th>
|
||||||
|
<th>Damage</th>
|
||||||
|
<th>Place</th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
echo "<tr>
|
|
||||||
|
<?php
|
||||||
|
$mapNames = array(
|
||||||
|
"Baltic_Main" => "Erangel",
|
||||||
|
"Chimera_Main" => "Paramo",
|
||||||
|
"Desert_Main" => "Miramar",
|
||||||
|
"DihorOtok_Main" => "Vikendi",
|
||||||
|
"Erangel_Main" => "Erangel",
|
||||||
|
"Heaven_Main" => "Haven",
|
||||||
|
"Kiki_Main" => "Deston",
|
||||||
|
"Range_Main" => "Camp Jackal",
|
||||||
|
"Savage_Main" => "Sanhok",
|
||||||
|
"Summerland_Main" => "Karakin",
|
||||||
|
"Tiger_Main" => "Taego"
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach ($lastMatches as $match) {
|
||||||
|
$matchid = $match['id'];
|
||||||
|
$date = new DateTime($match['createdAt']);
|
||||||
|
$date->modify('+1 hours');
|
||||||
|
$formattedDate = $date->format('m-d H:i:s');
|
||||||
|
echo "<tr>
|
||||||
|
|
||||||
<td><a href='matchinfo.php?matchid=$matchid'>" . $match['playername'] . "</a></td>
|
<td><a href='matchinfo.php?matchid=$matchid'>" . $match['playername'] . "</a></td>
|
||||||
|
<td><a href='matchinfo.php?matchid=$matchid'>" . $formattedDate . "</a></td>
|
||||||
<td><a href='matchinfo.php?matchid=$matchid'>" . $match['gameMode'] . "</a></td>
|
<td><a href='matchinfo.php?matchid=$matchid'>" . $match['gameMode'] . "</a></td>
|
||||||
<td><a href='matchinfo.php?matchid=$matchid'>" . $match['matchType'] . "</a></td>
|
<td><a href='matchinfo.php?matchid=$matchid'>" . $match['matchType'] . "</a></td>
|
||||||
<td><a href='matchinfo.php?matchid=$matchid'>" . (isset($mapNames[$match['mapName']]) ? $mapNames[$match['mapName']] : $match['mapName']) . "</a></td>
|
<td><a href='matchinfo.php?matchid=$matchid'>" . (isset($mapNames[$match['mapName']]) ? $mapNames[$match['mapName']] : $match['mapName']) . "</a></td>
|
||||||
|
|
@ -77,14 +81,14 @@ $lastMatches = array_slice($allMatches, 0, 8);
|
||||||
<td><a href='matchinfo.php?matchid=$matchid'>" . $match['stats']['winPlace'] . "</a></td>
|
<td><a href='matchinfo.php?matchid=$matchid'>" . $match['stats']['winPlace'] . "</a></td>
|
||||||
|
|
||||||
</tr>";
|
</tr>";
|
||||||
} ?>
|
} ?>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
<h2>Clan Info</h2>
|
<h2>Clan Info</h2>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
//CLANINFO
|
//CLANINFO
|
||||||
$clanInfoPath = './data/claninfo.json';
|
$clanInfoPath = './data/claninfo.json';
|
||||||
$clanmembersfile = './config/clanmembers.json';
|
$clanmembersfile = './config/clanmembers.json';
|
||||||
$clanmembers = json_decode(file_get_contents($clanmembersfile), true);
|
$clanmembers = json_decode(file_get_contents($clanmembersfile), true);
|
||||||
|
|
@ -97,7 +101,7 @@ $lastMatches = array_slice($allMatches, 0, 8);
|
||||||
echo "<tr><td><a href='latestmatches.php?selected_player=" . htmlspecialchars($value) . "'>name</a></td><td><a href='latestmatches.php?selected_player=" . htmlspecialchars($value) . "'>" . htmlspecialchars($value) . "</a></td></tr>";
|
echo "<tr><td><a href='latestmatches.php?selected_player=" . htmlspecialchars($value) . "'>name</a></td><td><a href='latestmatches.php?selected_player=" . htmlspecialchars($value) . "'>" . htmlspecialchars($value) . "</a></td></tr>";
|
||||||
}
|
}
|
||||||
foreach ($clan as $key => $value) {
|
foreach ($clan as $key => $value) {
|
||||||
if($key == 'updated'){
|
if ($key == 'updated') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
echo "<tr><td>" . htmlspecialchars($key) . "</td><td>" . htmlspecialchars($value) . "</td></tr>";
|
echo "<tr><td>" . htmlspecialchars($key) . "</td><td>" . htmlspecialchars($value) . "</td></tr>";
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
$date = new DateTime($match['createdAt']);
|
$date = new DateTime($match['createdAt']);
|
||||||
$date->modify('+2 hours');
|
$date->modify('+1 hours');
|
||||||
$formattedDate = $date->format('m-d H:i:s');
|
$formattedDate = $date->format('m-d H:i:s');
|
||||||
|
|
||||||
$matchType = $match['matchType'];
|
$matchType = $match['matchType'];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue