<?php
include_once 'config_wk_pay.php';
include ('core/system.php');

head('Покупка');
reg();
//if($user['id']!=1){ header('location:index.php');exit;}






/*

?>

<style> .bank-action-line:before {    content: '';    width: 16px;    height: 16px;    background: url('/img/at/bank/gal.png') 0 0 no-repeat;    position: absolute;    left: -19px;    top: 4px;}.section-vip:after {    content: '';    position: absolute;    width: 100%;    left: 0;    top: 9px;    height: 122px;    background: url('////') 50% 0 no-repeat;}.b-pack._label-hit .pack-icon:after, .b-pack._label-action .pack-icon:after {    content: '';    width: 41px;    height: 23px;    position: absolute;    z-index: 100;    top: 1;    left: -2px;    background: url('/img/at/bank/hit.png') 0 0 no-repeat;}.b-pack._label-action .pack-icon:after {    background: url('img/at/bank/hit') 0 0 no-repeat;}.bank-action {    background: url('/img/at/bank/action.png') 50% 3px no-repeat #002912;    border: 1px solid #005d1b;    padding: 27px 27px 12px 27px;    margin: 0 auto 10px auto;    max-width: 320px;}       .bank-action-line {    padding-top: 5px;    position: relative;    color: #c0c295;}




.b-pack._label-hit .pack-icon:after, .b-pack._label-action .pack-icon:after {    content: '';    width: 41px;    height: 23px;    position: absolute;    z-index: 100;    top: 1;    left: -2px;    background: url('/img/at/bank/hit.png') 0 0 no-repeat;}.b-pack._label-action .pack-icon:after {    background: url('/img/bank/prec.png') 0 0 no-repeat;}





.pack-icon {    display: inline-block;    position: relative;                vertical-align: middle;    width: 75px;    height: 60px;    background-image: url('/img/at/bank/gold.png');    background-repeat: no-repeat;}.pack-icon._pack-icon-7 { background-position: 0 0;      }.pack-icon._pack-icon-6 { background-position: 0 -65px;  }



.pack-info {    padding: 14px 0 7px 0;        color: #867863;}


.antique {
    color: #f3e6d0 !important;
}



.pack-icon._pack-icon-5 { background-position: 0 -130px; }.pack-icon._pack-icon-4 { background-position: 0 -195px; }.pack-icon._pack-icon-3 { background-position: 0 -260px; }.pack-icon._pack-icon-2 { background-position: 0 -325px; }.pack-icon._pack-icon-1 { background-position: 0 -390px; }.pack-count {    display: block;                font-size: 16px;    color: #f3e6d0;    position: absolute;    width: 100%;    top: 54px;    left: 0;    text-align: center;    white-space: nowrap;}

.b-pack .go-btn {
    margin-right: 38px;
    color: #f9f4e1 !important;
}

.go-btn {
    display: block;
    text-decoration: none;
    position: relative;
    border-width: 3px;
    border-style: solid;
    border-color: #14dd00 #056400 #0a8c00 #056400;
    background: #004700;
    background: linear-gradient(to bottom, #004700 0%,#0b6300 100%);
}

.go-btn-border {
    display: table;
    width: 100%;
    text-decoration: none;
    height: 30px;
    border-collapse: collapse;
}

.go-btn-in {
    display: table-cell;
    position: relative;
    width: 100%;
    height: 30px;
    vertical-align: middle;
    color: #fff;
    text-align: center;}
</style><?




*/
























if($user['pers']==1){ $epos=15; $legos=17;} else{ $epos=16; $legos=18;}
$ep_colco =$dbc->query("SELECT * FROM `dung_item` WHERE `id`='".$epos."'")->fetch_assoc();

$leg_colco =$dbc->query("SELECT * FROM `dung_item` WHERE `id`='".$legos."'")->fetch_assoc();

if($user['pers']==1){ $class='Воин';} else{ $class='Маг';}


if(isset($_GET['pay100'])){


$summa=100/$curs_almaz;

    $data=file_get_contents('http://worldkassa.ru/user/oplata.php?id_shop='.$id_shop.'&summa='.$summa.'&hash='.$hash);
    if (is_numeric($data))
        {
        $dbc->query("INSERT INTO `worldkassa` (`id_user`, `id_bill`, `time`, `summa`, `type`) values('".$user['id']."', '".$data."', '".time()."', '".$summa."', 1)");


        header("Location: http://worldkassa.ru/user/oplata.php?uniq=".$data);
        exit();
        }
        else
        {
        echo $data; //вывод ошибок WorldKassa, если есть
        } 







}
if(isset($_GET['pay200'])){


$summa=200/$curs_almaz;

    $data=file_get_contents('http://worldkassa.ru/user/oplata.php?id_shop='.$id_shop.'&summa='.$summa.'&hash='.$hash);
    if (is_numeric($data))
        {
        $dbc->query("INSERT INTO `worldkassa` (`id_user`, `id_bill`, `time`, `summa`, `type`) values('".$user['id']."', '".$data."', '".time()."', '".$summa."', 1)");


        header("Location: http://worldkassa.ru/user/oplata.php?uniq=".$data);
        exit();
        }
        else
        {
        echo $data; //вывод ошибок WorldKassa, если есть
        } 







} 

if(isset($_GET['pay500'])){


$summa=500/$curs_almaz;

    $data=file_get_contents('http://worldkassa.ru/user/oplata.php?id_shop='.$id_shop.'&summa='.$summa.'&hash='.$hash);
    if (is_numeric($data))
        {
        $dbc->query("INSERT INTO `worldkassa` (`id_user`, `id_bill`, `time`, `summa`, `type`) values('".$user['id']."', '".$data."', '".time()."', '".$summa."', 1)");


        header("Location: http://worldkassa.ru/user/oplata.php?uniq=".$data);
        exit();
        }
        else
        {
        echo $data; //вывод ошибок WorldKassa, если есть
        } 







} 

if(isset($_GET['pay5000'])){


$summa=5000/$curs_almaz;

    $data=file_get_contents('http://worldkassa.ru/user/oplata.php?id_shop='.$id_shop.'&summa='.$summa.'&hash='.$hash);
    if (is_numeric($data))
        {
        $dbc->query("INSERT INTO `worldkassa` (`id_user`, `id_bill`, `time`, `summa`, `type`) values('".$user['id']."', '".$data."', '".time()."', '".$summa."', 1)");


        header("Location: http://worldkassa.ru/user/oplata.php?uniq=".$data);
        exit();
        }
        else
        {
        echo $data; //вывод ошибок WorldKassa, если есть
        } 







} 



if(isset($_GET['pay2500'])){


$summa=2500/$curs_almaz;

    $data=file_get_contents('http://worldkassa.ru/user/oplata.php?id_shop='.$id_shop.'&summa='.$summa.'&hash='.$hash);
    if (is_numeric($data))
        {
        $dbc->query("INSERT INTO `worldkassa` (`id_user`, `id_bill`, `time`, `summa`, `type`) values('".$user['id']."', '".$data."', '".time()."', '".$summa."', 1)");


        header("Location: http://worldkassa.ru/user/oplata.php?uniq=".$data);
        exit();
        }
        else
        {
        echo $data; //вывод ошибок WorldKassa, если есть
        } 







} 








if (isset($_POST['count']))
	{
    $summa=$_POST['count']/$curs_almaz;
$summa = int($summa);

	$data=file_get_contents('http://worldkassa.ru/user/oplata.php?id_shop='.$id_shop.'&summa='.$summa.'&hash='.$hash);
	if (is_numeric($data))
		{
		$dbc->query("INSERT INTO `worldkassa` (`id_user`, `id_bill`, `time`, `summa`, `type`) values('".$user['id']."', '".$data."', '".time()."', '".$summa."', 1)");


        header("Location: http://worldkassa.ru/user/oplata.php?uniq=".$data);
		exit();
		}
		else
		{
		echo $data; //вывод ошибок WorldKassa, если есть
		}
	}







?> 

<style> .bank-action-line:before {    content: '';    width: 16px;    height: 16px;    background: url('/img/at/bank/gal.png') 0 0 no-repeat;    position: absolute;    left: -19px;    top: 4px;}.section-vip:after {    content: '';    position: absolute;    width: 100%;    left: 0;    top: 9px;    height: 122px;    background: url('////') 50% 0 no-repeat;}.b-pack._label-hit .pack-icon:after, .b-pack._label-action .pack-icon:after {    content: '';    width: 41px;    height: 23px;    position: absolute;    z-index: 100;    top: 1;    left: -2px;    background: url('/img/at/bank/hit.png') 0 0 no-repeat;}.b-pack._label-action .pack-icon:after {    background: url('img/at/bank/hit') 0 0 no-repeat;}.bank-action {    background: url('/img/at/bank/action.png') 50% 3px no-repeat #002912;    border: 1px solid #005d1b;    padding: 27px 27px 12px 27px;    margin: 0 auto 10px auto;    max-width: 320px;}       .bank-action-line {    padding-top: 5px;    position: relative;    color: #c0c295;} 




.b-pack._label-hit .pack-icon:after, .b-pack._label-action .pack-icon:after {    content: '';    width: 41px;    height: 23px;    position: absolute;    z-index: 100;    top: 1;    left: -2px;    background: url('/img/at/bank/hit.png') 0 0 no-repeat;}.b-pack._label-action .pack-icon:after {    background: url('/img/bank/prec.png') 0 0 no-repeat;} 





.pack-icon {    display: inline-block;    position: relative;                vertical-align: middle;    width: 75px;    height: 60px;    background-image: url('/img/at/bank/gold.png');    background-repeat: no-repeat;}.pack-icon._pack-icon-7 { background-position: 0 0;      }.pack-icon._pack-icon-6 { background-position: 0 -65px;  } 



.pack-info {    padding: 14px 0 7px 0;        color: #867863;} 


.antique { 
    color: #f3e6d0 !important; 
} 



.pack-icon._pack-icon-5 { background-position: 0 -130px; }.pack-icon._pack-icon-4 { background-position: 0 -195px; }.pack-icon._pack-icon-3 { background-position: 0 -260px; }.pack-icon._pack-icon-2 { background-position: 0 -325px; }.pack-icon._pack-icon-1 { background-position: 0 -390px; }.pack-count {    display: block;                font-size: 16px;    color: #f3e6d0;    position: absolute;    width: 100%;    top: 54px;    left: 0;    text-align: center;    white-space: nowrap;} 

.b-pack .go-btn { 
    margin-right: 38px; 
    color: #f9f4e1 !important; 
} 

.go-btn { 
    display: block; 
    text-decoration: none; 
    position: relative; 
    border-width: 3px; 
    border-style: solid; 
    border-color: #14dd00 #056400 #0a8c00 #056400; 
    background: #004700; 
    background: linear-gradient(to bottom, #004700 0%,#0b6300 100%); 
} 

.go-btn-border { 
    display: table; 
    width: 100%; 
    text-decoration: none; 
    height: 30px; 
    border-collapse: collapse; 
} 

.go-btn-in { 
    display: table-cell; 
    position: relative; 
    width: 100%; 
    height: 30px; 
    vertical-align: middle; 
    color: #fff; 
    text-align: center;} 
</style><? 



















?><div class="bg-deep pt5">
<div>
<div class="bank-action">
<div class="bank-action-line">

                                 <div>
<?    

include_once 'action_view.php';









?>
                                 </div>
                            
</div></div><?

include_once 'action_view';

echo " <center><span style=\"color: #e2c10d\">Акции на данный момент не проходит!</span><br/> Стоимость <img src='img/money/money.png'>5 золота  (1 руб)  не учитывая комиссии 5% </center><br/>";









?><div>

<div>
<div class="b-pack _label-hit">
<div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td width="80" valign="top" align="right">
<div class="pack-icon _pack-icon-6"><div class="pack-count">5000</div></div>



</td>
<td>
<div class="pack-info">
<div class="antique">
<img src="img/money/money.png"><span class="va-m">5000 золота</span>

</div>
<div class="antique">
<nobr></nobr>
<nobr>+ <span class="entity e-status"><img src="img/stat/vip.png"><span class="e-name"><span class="va-m">VIP на 30 дней</span></span></span></nobr>

</div>
</div>

<a class="go-btn" href="pay.php?pay5000">



<span class="go-btn-border">
<span class="go-btn-in">~1000 руб.</span>




</span>
</a>

</td>
</tr>
</tbody>
</table>
</div>
</div>
</div><?



?><div> 

<div> 
<div class="b-pack _label-hit"> 
<div> 
<table width="100%" border="0" cellpadding="0" cellspacing="0"> 
<tbody> 
<tr> 
<td width="80" valign="top" align="right"> 
<div class="pack-icon _pack-icon-6"><div class="pack-count">2500</div></div>



</td> 
<td> 
<div class="pack-info"> 
<div class="antique"> 
<img src="img/money/money.png"><span class="va-m">2500 золота</span> 


</div> 
<div class="antique"> 
<nobr></nobr> 
<nobr>+ <span class="entity e-status"><img src="img/stat/vip.png"><span class="e-name"><span class="va-m">VIP на 7 дней</span></span></span></nobr> 


</div> 
</div> 

<a class="go-btn" href="pay.php?pay2500"> 




<span class="go-btn-border"> 
<span class="go-btn-in">~500 руб .</span> 


</span> 
</a> 

</td> 
</tr> 
</tbody> 
</table> 
</div> 
</div> 
</div><? 





?><div> 

<div> 
<div class="b-pack _label-hit"> 
<div> 
<table width="100%" border="0" cellpadding="0" cellspacing="0"> 
<tbody> 
<tr> 
<td width="80" valign="top" align="right"> 
<div class="pack-icon _pack-icon-6"><div class="pack-count">500</div></div>



</td> 
<td> 
<div class="pack-info"> 
<div class="antique"> 
<img src="img/money/money.png"><span class="va-m">500 золота</span> 

</div> 
<div class="antique"> 
<nobr></nobr> 
<nobr>+ <span class="entity e-status"><img src="img/stat/vip.png"><span class="e-name"><span class="va-m">VIP на 7 дней</span></span></span></nobr> 

</div> 
</div> 

<a class="go-btn" href="pay.php?pay500"> 



<span class="go-btn-border"> 
<span class="go-btn-in">~100 руб.</span> 


</span> 
</a> 

</td> 
</tr> 
</tbody> 
</table> 
</div> 
</div> 
</div><? 

























echo 'Выбрать другое количество: 


<form action="?" method="post">

<input id="login" type="text" class="input-area"  name="count">



<br>
<div class="form-submit">
<div class="form-submit"><input type="submit" class="btn" value="Оплатить"/></div>










     </form>';
if($user['brak']>0){



 $brak  = $dbc->query(" select * from `users` where `id` = '".$user['brak']."'")->fetch_assoc();    


?></br>При покупке золота:<a href="pers.php?ank=<?=$brak['id']?>"><img src="img/class/<?=$brak['storona']?>/<?=$brak['pers']?>/pers.png" width="14" height="14" alt="*"><?=$brak['login']?></a> получает 50% бонусом от приобретенной суммы<?}

?><div class="b-panel-new dblue-panel bordered mt2">
<?

//<div class="panel-inner-2">при покупке 100 золота и больше.. выдается vip - статус на сутки.. если он не активен!


/*

?><div class="b-panel-new dblue-panel bordered mt2"><div class="panel-inner-2">

При покупке<img src="img/money/money.png">1000 Вы получаете ресурсы <img src="/img/stat/sera.png">1000000 <img src="/img/money/rubin.png">15000 Вещи для питомца :<a href="info_it.php?ids=2206" class="iLegendary">Чешуя Мрака</a> +50 Книг Познания </div></div><? 


?><div class="b-panel-new dblue-panel bordered mt2"><div class="panel-inner-2">

При покупке<img src="img/money/money.png">2500 Вы получаете ресурсы <img src="/img/stat/sera.png">2000000 <img src="/img/money/rubin.png">40000 Вещи для питомца :<a href="info_it.php?ids=2206" class="iLegendary">Чешуя Мрака</a> ,<a href="info_it.php?ids=2207" class="iLegendary">Ошейник Мрака</a> +100 Книг Познания </div></div><?  



?><div class="b-panel-new dblue-panel bordered mt2"><div class="panel-inner-2">

При покупке<img src="img/money/money.png">5000 Вы получаете ресурсы <img src="/img/stat/sera.png">5000000 <img src="/img/money/rubin.png">100000 Вещи для питомца :<a href="info_it.php?ids=2206" class="iLegendary">Чешуя Мрака</a> ,<a href="info_it.php?ids=2207" class="iLegendary">Ошейник Мрака</a> , <a href="info_it.php?ids=2208" class="iLegendary">Коготь Мрака</a> +200 Книг Познания </div></div><?  















*/














include_once 'action_view.php'; 

/*
$epos = 23;
$tip='Артефакт';
if($user['pers']==1){ $class='Воин';}else{$class='Маг';} 

$use  = 1408;

$buy = $dbc->query("SELECT * FROM `dung_item` WHERE `id`='".$epos."' LIMIT 1")->fetch_assoc(); 


?><div class="lblue-panel">
<div class="panel-inner-2">

<div class="el-img">
<span><img src="/img/items/<?=$buy['img']?>.png"></span>
</div>
<div class="margin-from-image">
<div class="el-name c-simple">
<a href="dung_item.php?ids=<?=$buy['id']?>" class="<?=$buy['lite']?>"><?=$buy['nik']?></a>



</div>
<span><?=$tip?> <?=$buy['level']?> ур.,<span><?=$class?></span>

</div></div></div><?





?><div class="b-panel-new dblue-panel bordered mt2">

<div class="panel-inner-2"><div class="font-small text-italic c-verygray"> Так же дополнительно вы получаете <img src="img/stat/sera.png">5000000 <img src="img/money/rubin.png">150000, <span class="info">Vip статус на 2 месяца </span></div></div></div><?


*/

/*

?><div class="panel-inner-2">



При покупке<img src="img/money/money.png">1000 Вы получаете<div class="el-img"> <img alt="" src="/pets/sum_volk.png"/></div>




<span class="iEpic">Сумерчный Волк</span>

<div class="el-descr"><div class="mb5">
<span class="c-sel ml5">
<img src="img/stat/hp.png" alt="."><span>250</span>
<img src="img/stat/AKulak.png" alt="."><span>250</span>
<img src="images/icons/armor.png" alt="."><span>250</span>
</span>
</div></div></div></div>






<?



?><div class="b-panel-new dblue-panel bordered mt2"><div class="panel-inner-2">



При покупке<img src="img/money/money.png">2500 Вы получаете<div class="el-img"> <img alt="" src="/pets/sha.png"/></div>




<span class="iEpic">Шаниру</span>

<div class="el-descr"><div class="mb5">
<span class="c-sel ml5">
<img src="img/stat/hp.png" alt="."><span>400</span>
<img src="img/stat/AKulak.png" alt="."><span>400</span>
<img src="images/icons/armor.png" alt="."><span>400</span>
</span> + <a href="dung_item.php?ids=21" class="iLegendary">Пояс Вечности</a> 
</div></div></div></div>






<?


?><div class="b-panel-new dblue-panel bordered mt2"><div class="panel-inner-2">



При покупке<img src="img/money/money.png">5000 Вы получаете<div class="el-img"> <img alt="" src="/pets/likan.png"/></div>




<span class="iEpic">Ликан</span>

<div class="el-descr"><div class="mb5">
<span class="c-sel ml5">
<img src="img/stat/hp.png" alt="."><span>600</span>
<img src="img/stat/AKulak.png" alt="."><span>600</span>
<img src="images/icons/armor.png" alt="."><span>600</span>
</span> + <a href="dung_item.php?ids=21" class="iLegendary">Пояс Вечности</a> ,<a href="dung_item.php?ids=22" class="iLegendary">Пентаграмма Соломона</a>
</div></div></div></div>





<?


?><div class="b-panel-new dblue-panel bordered mt2"><div class="panel-inner-2"><span class="major">При покупке у вас не должно быть питомца.. его нужно продать.. все выше указанные бонусы получает так же и ваш партнер.</span></div></div><?



*/

?></div><?
foot();
?>
