Advertisement
Guest User

Untitled

a guest
Dec 11th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. <?php
  2. session_start();
  3. include 'config.php';
  4.  
  5. if((isset($_POST['summ']) && isset($_SESSION['post_steamid'])) || isset($_POST['summ'])) {
  6. if(isset($_POST['steamid'])) {
  7. $part1 = explode(":", $_POST['steamid']);
  8. if($part1[0] == 'STEAM_0') {
  9. $_POST['steamid'] = "STEAM_1:".$part1[1].":".$part1[2];
  10. }
  11. $_SESSION['post_steamid'] = $_POST['steamid'];
  12. }
  13. if($_POST['summ'] >= $minSumm) {
  14. $_SESSION['summ'] = 'correct';
  15. $sql = 'INSERT INTO `buy` (`status`, `steamid`, `summ`, `time`) VALUES (:status, :steamid, :summ, :time)';
  16. $stmt = $pdo->prepare($sql);
  17. $stmt->bindValue(':status', 0);
  18. $stmt->bindValue(':steamid', $_SESSION['post_steamid']);
  19. $stmt->bindValue(':summ', $_POST['summ']);
  20. $stmt->bindValue(':time', time());
  21. $inserted = $stmt->execute();
  22. echo "<script language='JavaScript'> window.location.href = 'http://www.free-kassa.ru/merchant/cash.php?m=".$shopid."&oa=".$_POST['summ']."&o=".$pdo->lastInsertId()."&s=".md5($shopid.':'.$_POST['summ'].':'.$secret.':'.$pdo->lastInsertId())."'; </script>";
  23. } else {
  24. $_SESSION['summ'] = 'incorrect';
  25. echo '<script>location.replace(\'index.php\')</script>';
  26. }
  27. } else {
  28. die('hacking attempt!');
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement