-
Notifications
You must be signed in to change notification settings - Fork 1
/
donators.php
49 lines (38 loc) · 1.28 KB
/
donators.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
function convert($data){
$tmp=explode(':',$data);
$steamid64=bcadd((($tmp[2]*2)+$tmp[1]),'76561197960265728');
$url="https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key= &steamids=$steamid64";
$get_json=file_get_contents($url);
$decode=json_decode($get_json,true);
if(!empty($decode)){
foreach($decode['response']['players'] as $detail ){
$avatar=$detail['avatarmedium'];
$name=$detail['personaname'];
$profile_url=$detail['profileurl'];
}
}
echo "<a href=$profile_url target='_blank'><img src=$avatar> $name";
}
?>
<h2>- Donators - </h2>
<table class="table">
<tr>
<th>Name</th>
<th>Value($)</th>
</tr>
<?php
include_once 'db_connect2.php';
$q="select steamID,sum(tradeValue) from tradeoffers group by steamID";
$r=mysqli_query($db,$q);
while($row=mysqli_fetch_array($r)){?>
<tr>
<td>
<?php convert($row[0]); ?>
</td>
<td>
<?php echo $row[1]; }?>
</td>
</tr>
</table>
<h2><a href="https://steamcommunity.com/tradeoffer/new/?partner=294994601&token=wQU7CFHE" target="_blank"><button class="btn btn-success">Donate</button></a></h2>