<?php

require_once 'core/system.php';








head('Мудрец');



reg(); 


$dop = $dbc->query("SELECT * FROM `dop` WHERE `user` = '".$user['id']."' LIMIT 1")->fetch_assoc(); 
if(isset($_GET['rand'])){



if($dop['frag']<500){ header("location:fr.php");exit;}


$bonus=$dbc->query("SELECT * FROM `baza_bonus` where `sunduk`= 1 ORDER BY RAND() LIMIT 1 ")->fetch_assoc();   


$bylol = ("INSERT INTO `bag_bonus` (user_id,nik,tip,img,dop,lite,time) values('".$user['id']."','".$bonus['nik']."','".$bonus['tip']."','".$bonus['img']."','".$bonus['dop']."','".$bonus['lite']."','".$bonus['time']."')"); 



$dbc->query($bylol);



$_SESSION['message']='<center>Вы нашли <span
class='.$bonus['lite'].'>




'.$bonus['nik'].'</span></center>'; 




$dbc->query("update `dop` set `frag` = `frag`-500 where user = 
'".$user['id']."'"); 




header('location:fr.php');exit;

} 
?><img src="/img/rom/m.jpg" width="100%">








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

<div class="panel-inner-2"><div class="font-small text-italic c-verygray"><span class="info">Вы можете обменять <img src="/img/scroll/2ff.png" style=" height:12px;width:12px;"> на свитки.</span> у вас <img src="/img/scroll/2ff.png" style=" height:12px;width:12px;"> : <?=$dop['frag']?></div></div></div><?



?><center><a class="btn big" href="fr.php?rand">Получить Свиток, 500 <img src="/img/scroll/2ff.png" style=" height:12px;width:12px;"></a></center><? 
foot();
