7cce8f9e68
This reverts commit 90c2993d76
.
114 lines
2.9 KiB
PHP
114 lines
2.9 KiB
PHP
<head>
|
|
<title>Cheaterliste</title>
|
|
<link href="style.css?v=1.0.1" rel="stylesheet" type="text/css">
|
|
</head>
|
|
|
|
<body>
|
|
<div class="bild">
|
|
<img src="schriftv2.png">
|
|
</div>
|
|
|
|
<?php
|
|
session_start();
|
|
|
|
$vac = "vac";
|
|
$host = "localhost";
|
|
$user = "vac";
|
|
$password = "hPUf8e4karnz61bS";
|
|
|
|
$conn = new mysqli($host,$user,$password,$vac);
|
|
if($conn->connect_error){
|
|
die("Verbindung fehlgeschlagen: " . $conn->connect_error);
|
|
}
|
|
?>
|
|
|
|
<table style="width:50%" class="center">
|
|
<tr>
|
|
<th style="padding: 0.5em 0.5em">Eintrag</th>
|
|
<th style="padding: 0.4em">Avatar</th>
|
|
<th class="profil">Steam-Profil</th>
|
|
<th style="padding: 0.4em">Ersteller</th>
|
|
<th style="padding: 0.4em" class="Zeit">Erstelldatum</th>
|
|
<th style="padding: 0.4em">VAC-Ban</th>
|
|
</tr>
|
|
|
|
<?php
|
|
$sql = "SELECT * FROM cheaterlist ORDER BY addtime DESC;";
|
|
$result = $conn->query($sql);
|
|
$number = 1;
|
|
$getplayersummarie ="http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=E8D51260E5DF95AE8A6DA139D6C80288&steamids=";
|
|
$avatarid = 0;
|
|
$fullids
|
|
while($row = $result->fetch_assoc()){
|
|
if($row['deleted'])
|
|
continue;
|
|
|
|
$id = explode( "/", $row['url']);
|
|
|
|
$fullids = $fullids . end($id) . ",";
|
|
$number++;
|
|
}
|
|
|
|
$fullcallurl = $getplayersummarie . $fullcallurl;
|
|
$summarie = file_get_contents($fullcallurl);
|
|
$temp_summarie = json_decode($fullcallurl, true);
|
|
|
|
while($row = $result->fetch_assoc()){
|
|
if($row['deleted'])
|
|
continue;
|
|
|
|
$avatarurl = $temp_summarie["response"]["players"][$avatarid]["avatarmedium"];
|
|
|
|
$output = "<tr>
|
|
<td>".$number."</td>
|
|
<td><img src=$avatarurl></td>
|
|
<td class='profil'><a target ='_blank'href='".$row['url']."'>".$row['url']."</td>
|
|
<td>".$row['author']."</td>
|
|
<td>".$row['addtime']."</td>";
|
|
if($row['banned'] == 0){
|
|
$output .= "<td><img src='kreuz.png' height='20' width='20'</td>
|
|
</tr>";
|
|
}else{
|
|
$output .= "<td><img src='haken.png' height='20' width='20'</td>
|
|
</tr>";
|
|
}
|
|
echo $output;
|
|
$number++;
|
|
$avatarid++;
|
|
}
|
|
?>
|
|
</table><br>
|
|
|
|
|
|
|
|
<?php
|
|
if (!isset ($_SESSION['id'])){
|
|
echo '<div class="loginform">' .
|
|
'<form action="/login.php" method="post">' .
|
|
'<input type="text" placeholder="Username" name="user">' .
|
|
'<input type="password" placeholder="Password" name="pw">' .
|
|
'<input type="submit" value="Login">' .
|
|
'</form>' .
|
|
'</div>';
|
|
if (isset ($_SESSION['status'])){
|
|
echo $_SESSION['status'];
|
|
}
|
|
return;
|
|
}
|
|
?>
|
|
|
|
<?php
|
|
echo '<div class="loginform">' .
|
|
'<form action="/insert.php" method="post">' .
|
|
'<input type="url" pattern="https?://.+" required placeholder="Link" name="url"><br>' .
|
|
'<input type="submit" value="Add">' .
|
|
'</form>' .
|
|
'<form action="/logout.php" method="post">' .
|
|
'<input type="submit" value="Logout">' .
|
|
'</form>' .
|
|
'</div>';
|
|
?>
|
|
|
|
|
|
|
|
</body>
|