Advertisement
Guest User

Untitled

a guest
Dec 10th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. <?php
  2.  
  3. require_once 'config.php';
  4. require 'steamauth/steamauth.php';
  5. $info = $db->query("SELECT * FROM `clients` WHERE `clientid` = '" .$clientid . "'")->fetch_object();
  6. if(isset($_SESSION['steamid'])) {
  7. $prices = file_get_contents('price.txt');
  8. $parsedPrices = json_decode($prices);
  9. $get_content = file_get_contents("hhttp://api.csgo.im/loadInventory/apikey/".$_SESSION['steamid']."/false");
  10. $parsedInv = json_decode($get_content);
  11. $parsedInvT = $parsedInv;
  12. $counter = 0;
  13. $mindeposit = $info->min;
  14. foreach($parsedInv->items as $k => $v){
  15. $id = $v->assetid;
  16. $t = $v->tradable;
  17. $name = $v->market_hash_name;
  18. $price = $parsedPrices->$name*1.2;
  19. $price = round($price,2);
  20. $img = $v->img;
  21. if($t && $price && $price >= $mindeposit) {
  22. counter++;
  23. echo '<div class="csgoitem invitem" data-title="'.$name.'" data-tooltip="Type: gun<br>Value: '.$price.' $" id="'.$id.'" value="'. $price*10*10 .'" style="margin: 5px; padding: 5px;border: 1px solid gray;width: 90px;
  24. height: 90px;
  25. float: left;
  26. background:url(https://steamcommunity-a.akamaihd.net/economy/image/'.$img.'/80x80) no-repeat center center;">
  27. <div class="itemName">'.$name.'</div><div class="itemPrice">'.$price.' $</div>
  28. </div>';
  29. }
  30. }
  31. if($counter == 0){
  32. echo '<br><center><h4>Either your inventory is empty, you dont have any items cost higher than '.$mindeposit.'$ or steam might lagging. </h4></center><br>';
  33. }
  34. } else{
  35. echo 'Login in';
  36. }
  37. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement