<?
require ('../config/func.php');
$title = 'Покупка кристаллов';
require ('../config/header.php');
include 'sett.php';
?>
<div class="block"><center>У вас: <img src="/style/spach/cristal.png"> <?=$user['cristal'];?></center></div>
<div class="line"></div>
<?
if(isset($_GET['crist']))
{
$crist = intval($_GET['crist']);
if (isset($wk_cena_crist[$crist]))
{?>
<div class="block">
<form method="POST" action="https://wapkassa.ru/merchant/oplata.php">
<input type="hidden" name="WK_PAYMENT_SITE" value="<?=wk_id?>">
<input type="hidden" name="WK_PAYMENT_AMOUNT" value="<?=wk_summ($wk_cena_crist[$crist])?>">
<input type="hidden" name="WK_PAYMENT_COMM" value="Покупка кристаллов ID <?=$user['id']?>">
<input type="hidden" name="WK_PAYMENT_HASH" value="<?=strtoupper(hash("sha256",wk_id.wk_summ($wk_cena_crist[$crist]).wk_code))?>">
<input type="hidden" name="WK_PAYMENT_USER" value="<?=$user['id']?>">
<input type="hidden" name="WK_PAYMENT_TOVAR" value="crist">
<input type="hidden" name="WK_PAYMENT_COUNT" value="<?=$crist?>">
<center><input type="submit" value="Перейти к оплате"></center>
</form>
</div>
<?
require ('../config/footer.php');
exit;
}
}
?><div class="block"><?
foreach($wk_cena_crist as $key => $value)
{
echo "<a href='/paywk/?crist=$key'>Купить $key кристаллов</a><br>";
}
?></div><?
require ('../config/footer.php');
?>