Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $priv=$_GET['priv'];
- $steam=$_GET['stid'];
- //Заполни сам, пожалуйста дальше
- //ID привелегии => цена
- $prices = [
- "vip" => 5,
- "prem" => 10,
- "creat" => 15
- ];
- if(isset($prices[$priv]) and isset($steam)){
- echo "https://www.oplata.info/asp2/pay_wm.asp?id_d=2400801&lang=ru-RU&s=".$steam."&unit_cnt=".$prices[$priv];
- } else {
- echo "ERR";
- }
- JS
- function go() {
- var e = document.getElementById("group"),
- selected = e.value,
- res
- var req = new XMLHttpRequest()
- req.open('GET', "pay.php?priv="+selected+"&stid=76561198083372481", false)
- req.send()
- if (req.status != 200) {
- alert( req.status + ': ' + req.statusText )
- } else {
- res = req.responseText
- alert(res)
- }
- if(res != "ERR")
- window.open(res, '_blank');
- else
- alert("Ошибка!")
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement