Участник
Пользователь
- Сообщения
- 366
- Реакции
- 5
- Предупреждения
- 5
- Помог
- 1 раз(а)
Как вывести аватарку на сайт?
<div class="col-md-12 px-md-1 py-md-1">
<div class="block">
<div class="row">
<div class="col-md-6">
<?php
$steam1 = 'STEAM_1';
$steam2 = substr($row['steamid'], 0, 7);
if ( $steam1 == $steam2 )
{
$url = 'http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=A4BA25A5FA6A9C74239A408079127082&steamids='.toCommunityID($row['steamid']);
$shit = file_get_contents($url);
$json = json_decode($shit);
$steam_url = 'https://steamcommunity.com/profiles/'.toCommunityID($row['steamid']).'';
$steam_url_ava = $json->response->players[0]->avatarfull;
}
?>
<div class="media">
<!-- <img src="" class="mr-3"> -->
<?=@$steam_url_ava;?>
<div class="media-body">
<?php
// выводим иконку возле ника
if ( $main['userIcons'] == 1 ) {
$info = DB::run('SELECT * FROM
if ( $info ) {
echo '<span style="position: relative;bottom: 2px;">'.userIcon($info['access']).'</span>';
}
}
?>
<div class="col-xs-8" style="padding:0px;">
<div style="word-wrap: break-word; overflow: hidden; text-align: right;">
<a href="<?=@$steam_url;?>" target="_blank" title="Перейти к профилю в STEAM">
<img src="<?=@$steam_url_ava;?>" style="margin-bottom: 3px; margin-top: 3px; margin-left: 3px; margin-right: 15px; border-radius: 10px; box-shadow: 0 0px 7px; float:left; width: 80px; height: 80px;">
</a>
<div class="spoiler_links">История ников</div>
<div class="spoiler_body" style="display: none;">
<div class="spoiler_body_label">
История смены ников
</div>
<div class="spoiler_body_padding">
<table class="spoiler_body_table">
<tbody class="spoiler_body_tbody">
<tr class="spoiler_body_tr">
<td width="190px" class="spoiler_body_td_img">
<a href="<?=@$steam_url;?>" target="_blank" title="Перейти к профилю в STEAM">
<img src="Ссылка на аватарку" style="margin-bottom: 3px; margin-top: 5px; margin-left: 3px; margin-right: 3px; border-radius: 10px; width: 189px; height: 189px;">
</a>
</td>
<td class="spoiler_body_td">
<?php
$s_id = $row['steamid'];
$names = DB::run("SELECT * FROM
$name_count = $names->rowCount();
if ( $name_count > 0 )
{
$names = $names->FetchAll(PDO::FETCH_ASSOC);
foreach ($names as $r)
{
echo '<div class="spoiler_body_p" style="background-color: #2e3338;">'.$r['name'].'</div>';
}
}
else
{
echo '<div class="orange_alert">Нет информации</div>';
}
?>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<b>
Yfcnjzobq ybr
</b>
<br><?=@$steam_url;?>
</div>
</div>
</div>
<div class="block">
<div class="row">
<div class="col-md-6">
<?php
$steam1 = 'STEAM_1';
$steam2 = substr($row['steamid'], 0, 7);
if ( $steam1 == $steam2 )
{
$url = 'http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=A4BA25A5FA6A9C74239A408079127082&steamids='.toCommunityID($row['steamid']);
$shit = file_get_contents($url);
$json = json_decode($shit);
$steam_url = 'https://steamcommunity.com/profiles/'.toCommunityID($row['steamid']).'';
$steam_url_ava = $json->response->players[0]->avatarfull;
}
?>
<div class="media">
<!-- <img src="" class="mr-3"> -->
<?=@$steam_url_ava;?>
<div class="media-body">
<?php
// выводим иконку возле ника
if ( $main['userIcons'] == 1 ) {
$info = DB::run('SELECT * FROM
gm_amxadmins
WHERE steamid
= ? OR nickname
= ?', [ $row['steamid'], $row['name'] ])->fetch(PDO::FETCH_ASSOC);if ( $info ) {
echo '<span style="position: relative;bottom: 2px;">'.userIcon($info['access']).'</span>';
}
}
?>
<div class="col-xs-8" style="padding:0px;">
<div style="word-wrap: break-word; overflow: hidden; text-align: right;">
<a href="<?=@$steam_url;?>" target="_blank" title="Перейти к профилю в STEAM">
<img src="<?=@$steam_url_ava;?>" style="margin-bottom: 3px; margin-top: 3px; margin-left: 3px; margin-right: 15px; border-radius: 10px; box-shadow: 0 0px 7px; float:left; width: 80px; height: 80px;">
</a>
<div class="spoiler_links">История ников</div>
<div class="spoiler_body" style="display: none;">
<div class="spoiler_body_label">
История смены ников
</div>
<div class="spoiler_body_padding">
<table class="spoiler_body_table">
<tbody class="spoiler_body_tbody">
<tr class="spoiler_body_tr">
<td width="190px" class="spoiler_body_td_img">
<a href="<?=@$steam_url;?>" target="_blank" title="Перейти к профилю в STEAM">
<img src="Ссылка на аватарку" style="margin-bottom: 3px; margin-top: 5px; margin-left: 3px; margin-right: 3px; border-radius: 10px; width: 189px; height: 189px;">
</a>
</td>
<td class="spoiler_body_td">
<?php
$s_id = $row['steamid'];
$names = DB::run("SELECT * FROM
cp_name_history
WHERE steamid
= \"$s_id\"");$name_count = $names->rowCount();
if ( $name_count > 0 )
{
$names = $names->FetchAll(PDO::FETCH_ASSOC);
foreach ($names as $r)
{
echo '<div class="spoiler_body_p" style="background-color: #2e3338;">'.$r['name'].'</div>';
}
}
else
{
echo '<div class="orange_alert">Нет информации</div>';
}
?>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<b>
Yfcnjzobq ybr
</b>
<br><?=@$steam_url;?>
</div>
</div>
</div>
В этой теме было размещено решение! Перейти к решению.
Вложения
-
274.1 KB Просмотры: 83