Advertisement
I_GRIN_I

Untitled

Apr 7th, 2018
975
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. <?php
  2. $priv=$_GET['priv'];
  3. $steam=$_GET['stid'];
  4. //Заполни сам, пожалуйста дальше
  5. //ID привелегии => цена
  6. $prices = [
  7. "vip" => 5,
  8. "prem" => 10,
  9. "creat" => 15
  10. ];
  11. if(isset($prices[$priv]) and isset($steam)){
  12. echo "https://www.oplata.info/asp2/pay_wm.asp?id_d=2400801&lang=ru-RU&s=".$steam."&unit_cnt=".$prices[$priv];
  13. } else {
  14. echo "ERR";
  15. }
  16.  
  17.  
  18.  
  19.  
  20.  
  21. JS
  22.  
  23. function go() {
  24. var e = document.getElementById("group"),
  25. selected = e.value,
  26. res
  27. var req = new XMLHttpRequest()
  28. req.open('GET', "pay.php?priv="+selected+"&stid=76561198083372481", false)
  29. req.send()
  30. if (req.status != 200) {
  31. alert( req.status + ': ' + req.statusText )
  32. } else {
  33. res = req.responseText
  34. alert(res)
  35. }
  36. if(res != "ERR")
  37. window.open(res, '_blank');
  38. else
  39. alert("Ошибка!")
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement