<html>
<head>
<meta charset="utf-8">
<title>arma3.ddaygaming.com:2302 Wasteland stats</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<?php
$dbaddress = "server_ip_here";
$dbusername = "database_username";
$dbpassword = "database_password";
$dbname = "database_name";
$con=mysqli_connect("$dbaddress","$dbusername","$dbpassword","$dbname"); //server address, username, password, dbname// Check connection
{
}
//check order ascending or descending
if (isset($_GET["order"])) {
$sort = $_GET["order"];
if ($_GET["order"] == "asc"){
$sort = "desc";
$order = "asc";
}
else{
$sort = "asc";
$order = "desc";
}
}
//check filter
if (isset($_GET["name"])) {
$name = $_GET["name"];
}
else {
$name = "Name";
}
$list=array('Name', 'BankMoney', 'CaptureCount', 'PlayerKills', 'AIKills', 'ReviveCount', 'DeathCount');
{
//variable ok
}
else
{
$name = "name";
}
$query = mysqli_query($con,"SELECT * FROM playerinfo a INNER JOIN playerstats p ON a.UID = p.PlayerUID ORDER BY $name $order");
?><!--//echo "<table border='1'>-->
<table class="table">
<tr>
<?php echo "<th><a href=\"?order=$sort&name=Name\">Player Name</a></th>";?>
<?php echo "<th><a href=\"?order=$sort&name=BankMoney\">Money</a></th>";?>
<?php echo "<th><a href=\"?order=$sort&name=CaptureCount\">Capture Count</a></th>";?>
<?php echo "<th><a href=\"?order=$sort&name=PlayerKills\">Player Kills</a></th>";?>
<?php echo "<th><a href=\"?order=$sort&name=AIKills\">AI Kills</a></th>";?>
<?php echo "<th><a href=\"?order=$sort&name=ReviveCount\">Revives</a></th>";?>
<?php echo "<th><a href=\"?order=$sort&name=DeathCount\">Deaths</a></th>";?>
</tr>
<!--//";-->
<?php
{
?><tr class="success"><?php
echo "<td>" . $row['Name'] . "</td>";
echo "<td>" . $row['BankMoney'] . "</td>";
echo "<td>" . $row['CaptureCount'] . "</td>";
echo "<td>" . $row['PlayerKills'] . "</td>";
echo "<td>" . $row['AIKills'] . "</td>";
echo "<td>" . $row['ReviveCount'] . "</td>";
echo "<td>" . $row['DeathCount'] . "</td>";
echo "</tr>";
}
echo "</table>";
?>
<a href="http://ddaygaming.com">©ddaygaming.com</a>
</div>
</body>
</html>