Advertisement
Guest User

Untitled

a guest
Oct 17th, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. $refferals=$mysql->query('SELECT * FROM users WHERE refsteamid="'.$mysql->real_escape_string($_SESSION['steamid']).'"');
  2. if($refferals->num_rows >= 250 && $refferals[deposited_points] < 10000)
  3. {
  4. die('Some Your Refferal need deposit 10$.');
  5. }else
  6. {
  7.  
  8. if(floatval($itemsPrice) > floatval($userData['refmoney']))
  9. {
  10. die(''.$msg[$lang]["braksiana"].'');
  11. }
  12. else
  13. {
  14. if(count($items) == count($itemsNames) && count($itemsNames) > 0)
  15. {
  16. $tradelink = $userData["tlink"];
  17. $token = substr(strstr($tradelink, 'token='),6); //get last part of trade link containing the "token"
  18. $steamid2=$userData['steamid'];
  19. $mysql->query('UPDATE `users` SET `refmoney`=`refmoney`-"'.$itemsPrice.'" WHERE `steamid`="'.$_SESSION['steamid'].'"');
  20. $mysql->query('UPDATE `houseitems` SET `ininventory`=`ininventory`-"1" WHERE `itemid`=1 AND `id` IN('.implode(",", $items).')');
  21. $mysql->query("INSERT INTO `queueshop` (`bot`,`gameid`, `userid`, `token`, `response`, `attempts`, `items`, `status`) VALUES ('1','0','".$steamid2."','".$token."','0','0','".$mysql->real_escape_string(join('/', $itemsNames))."','active')");
  22. echo ''.$msg[$lang]["kupiles"].'';
  23. echo '';
  24. }
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement