<div class="panel panel-default">
<?php
include("db_connect.php");
$usersData = [];
$steamIds = [];
$query = "SELECT steam_id FROM users_profiles ORDER BY `id` DESC limit 15";
$result = mysql_query($query)or die("MySQL Error");
if (mysql_num_rows($result) > 0) {
while ($row = mysql_fetch_assoc($result)) {
$usersData[$row['steam_id']] = $row;
$steamIds = $row['steam_id'];
}
}
$url = "http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=".$steamauth['apikey']."&steamids=" . join(',', $steamIds);
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$result=curl_exec($ch);
curl_close($ch);
$steamData = json_decode($result, true);
foreach($steamData['response']['players'] as &$player) {
$usersData[$player['steamid']]['steam_avatar'] = $player['avatarfull'];
$usersData[$player['steamid']]['steam_name'] = $player['personaname'];
}
$chunked = array_chunk($usersData, 3);
?>
<table class="table table-striped table-responsive table-bordered">
<tbody>
<?php foreach($chunked as &$chunked_row): ?>
<tr>
<?php foreach($chunked_row as &$chunked_cell): ?>
<td>
<center>
<img src="<?= htmlspecialchars($chunked_cell['steam_avatar']); ?>" width="50px" height="50px"/>
<?= htmlspecialchars($chunked_cell['steam_avatar']); ?>
</center>
</td>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<div class="panel panel-default">
<div class="panel-body">
<div class="col-md-12">
<center>
<div class="col-md-4">
<h2><i class='fa fa-area-chart fa-2x'></i> All statistics</h2>
All CS:GO statistics are available here.
</div>
<div class="col-md-4">
<h2><i class='fa fa-fighter-jet fa-2x'></i> Fast response</h2>
Statistics are shown really fast, but also you need a good internet speed.
</div>
<div class="col-md-4">
<h2><i class='fa fa-lock fa-2x'></i> Security</h2>
All is secure. We don't use database for anything.<br /> We will never ask for your Steam password.
</div>
</center>
</div>
</div>
</div>
<a href="<img src="<?= htmlspecialchars($chunked_cell['steam_avatar']); ?>" width="50px" height="50px"/>"></a>
<a href="тут_адрес_куда_надо_перейти"><img src="<?= htmlspecialchars($chunked_cell['steam_avatar']); ?>" width="50px" height="50px"/></a>