Файл: public_html/bosses.php
Строк: 469
<?php
$title = 'Пещерные боссы Мариссы';
include './system/common.php'; //in the club
include './system/functions.php'; //in forty four
include './system/user.php'; //in canony
include './system/h.php'; //in share
//Soars like an eagle
//There's no tomorrow
//For fear or sorrow © 404No7Found-_-
if(!$user) {header('location: /');exit;} //Your block guest / Строго запрешенно новичкам сюда!
$users = mysql_fetch_array(mysql_query('SELECT * FROM `marisa_user` WHERE `user` = "'.$user['login'].'" LIMIT 1'));
if(!$users){
mysql_query('insert into `marisa_user` set `user` = "'.$user['login'].'", `key_silver`="0", `key_gold`="0", `kill_boss`="0"');
}
//Настройка общая модуля
$svitok_baks = 10; //цена одного маг свитка
$svitok_baks2 = 50; //цена пять маг свитка
$svitok_baks3 = 100; //цена десять маг свитка
$svitok_fire_baks = 35; //цена одного маг огненного свитка
$svitok_fire_baks2 = 175; //цена пять маг огненного свитка
$svitok_fire_baks3 = 350; //цена десять маг огненного свитка
$key = 0; //Виды ключей, не трогайте !
$key_img = 0; //Картинка ключа, не трогайте !
$mp = 15; //трата энерегии за один удар 15мп
$us_hp = rand(50,100);
$time = 500; //2 часа дается до поражения
$udar_fire = 300; //Огненная стрела 300 урона
$udar_mag = 100; //Магическая стрела 100 урона
$attack_key_silver = 9; //Для атаки босса требуется 10 серебрянный ключи
$attack_key_gold = 9; //Для атаки босса требуется 10 золотой ключи
$attack_key_sekret = 9; //Для атаки босса требуется 10 секретный ключи
?>
<style>
.line {background: #393939;height: 2px;}
.lines{border-top: 1px solid rgb(78, 76, 76);border-bottom: 1px solid rgb(78, 76, 76);border-left: 0;border-right: 0;margin: 5px 25% 5px 25%;}
</style>
<?
echo'<div class="title">Сражения</div><div class="mini-line"></div>';
if(isset($_SESSION['not'])){
echo "<div class='text center'><font color='lime'>";
echo $_SESSION['not'];
echo "</font></div><div class='line'></div>";
unset($_SESSION['not']);
}
if(isset($_SESSION['err'])){
echo "<div class='text center'><font color='red'>";
echo $_SESSION['err'];
echo "</font></div><div class='line'></div>";
unset($_SESSION['err']);
}
$p = (isset($_GET['action'])) ? htmlspecialchars($_GET['action']) : null;
switch($p){
default:
$gde = mysql_fetch_assoc(mysql_query('SELECT * FROM `marisa_fight` WHERE `user` = "'.$user['login'].'" LIMIT 1'));
if($gde){header('location: /bosses.php?action=fight');exit;} //Если битва началась то переведем игрока к битве
echo'<div class="text" style="text-align:left;"> <a href="/bosses.php?action=magazin">Магазин свитков</a></div><div class="line"></div>';
$boss = mysql_query("SELECT * FROM `marisa` ORDER BY `id`");
while($a = mysql_fetch_assoc($boss)){
$g++;
if($g == 1){
echo'<div class="content">';
echo'<table style="width:0px;"><tbody><tr>';
echo'<td><img width="50%" src="/images/bosses/bot_'.$a['img'].'.jpg?v2"></td>';
echo"<td style='float:left;margin-left:-50px;'><font color='white'>$a[name]</font><br/>";
echo"<font color='#c0b1a3'> Здоровье: 50,000</font> <img src='/images/icon/vit.png'><br/>";
echo"<font color='#c0b1a3'>Награда: $a[exp] <img src='/images/icon/exp.png'>, + $a[key_silv] <img src='/images/bosses/silver.png'>, + $a[serebro] <img src='/images/icon/gold.png'></font><br/><br/>";
echo"<div class='btn22' ><img src='/images/icon/sumstat.png'> <a href='/bosses.php?action=fight&id=$a[id]'>Атаковать</a></div>";
echo"</td></tr></tbody></table></div><div class='line'></div>";
}elseif($g == 2){
echo'<div class="content">';
echo'<table style="width:0px;"><tbody><tr>';
echo'<td><img width="50%" src="/images/bosses/bot_'.$a['img'].'.jpg?v2"></td>';
echo"<td style='float:left;margin-left:-50px;'><font color='white'>$a[name]</font><br/>";
echo"<font color='#c0b1a3'> Здоровье: 100,000</font> <img src='/images/icon/vit.png'><br/>";
echo"<font color='#c0b1a3'>Награда: $a[exp] <img src='/images/icon/exp.png'>, + $a[key_gold] <img src='/images/bosses/gold.png'>, + $a[gold] <img src='/images/icon/gold.png'></font><br/>";
echo"<div class='lines'></div>";
echo"<center><font color='#c0b1a3'>Требования:</font></center>";
echo"<center><font color='#c0b1a3'>Серебряные ключи: $users[key_silver]/10 <img src='/images/bosses/silver.png'></font></center><br/><br/>";
if($users['key_silver'] > $attack_key_silver){
echo"<div class='btn22' ><img src='/images/icon/sumstat.png'> <a href='/bosses.php?action=fight&id=$a[id]'>Атаковать</a></div>";
}
echo"</td></tr></tbody></table></div><div class='line'></div>";
}elseif($g == 3){
echo'<div class="content">';
echo'<table style="width:0px;"><tbody><tr>';
echo'<td><img width="50%" src="/images/bosses/bot_'.$a['img'].'.jpg?v2"></td>';
echo"<td style='float:left;margin-left:-50px;'><font color='white'>$a[name]</font><br/>";
echo"<font color='#c0b1a3'> Здоровье: 450,000</font> <img src='/images/icon/vit.png'><br/>";
echo"<font color='#c0b1a3'>Награда: $a[exp] <img src='/images/icon/exp.png'>, + $a[key_gold] <img src='/images/bosses/secret.png'>, + $a[gold] <img src='/images/icon/gold.png'></font><br/>";
echo"<div class='lines'></div>";
echo"<center><font color='#c0b1a3'>Требования:</font></center>";
echo"<center><font color='#c0b1a3'>Золотые ключи: $users[key_gold]/10 <img src='/images/bosses/gold.png'></font></center><br/><br/>";
if($users['key_gold'] > $attack_key_gold){
echo"<div class='btn22' ><img src='/images/icon/sumstat.png'> <a href='/bosses.php?action=fight&id=$a[id]'>Атаковать</a></div>";
}
echo"</td></tr></tbody></table></div><div class='line'></div>";
}elseif($g == 4){
echo'<div class="content">';
echo'<table style="width:0px;"><tbody><tr>';
echo'<td><img width="50%" src="/images/bosses/bot_'.$a['img'].'.jpg?v2"></td>';
echo"<td style='float:left;margin-left:-50px;'><font color='white'>$a[name]</font><br/>";
echo"<font color='#c0b1a3'> Здоровье: 500,000</font> <img src='/images/icon/vit.png'><br/>";
echo"<font color='#c0b1a3'>Награда: $a[exp] <img src='/images/icon/exp.png'>, + $a[krys] <img src='/images/bosses/diamond.png'>, + $a[gold] <img src='/images/icon/gold.png'></font><br/>";
echo"<div class='lines'></div>";
echo"<center><font color='#c0b1a3'>Требования:</font></center>";
echo"<center><font color='#c0b1a3'>Секретные ключи: $users[key_sekret]/10 <img src='/images/bosses/secret.png'></font></center><br/><br/>";
if($users['key_sekret'] > $attack_key_sekret){
echo"<div class='btn22' ><img src='/images/icon/sumstat.png'> <a href='/bosses.php?action=fight&id=$a[id]'>Атаковать</a></div>";
}
echo"</td></tr></tbody></table></div><div class='line'></div>";
}elseif($g >= 5){
echo'<div class="content">';
echo'<table style="width:0px;"><tbody><tr>';
echo'<td><img width="50%" src="/images/bosses/bot_'.$a['img'].'.jpg?v2"></td>';
echo"<td style='float:left;margin-left:-50px;'><font color='white'>$a[name]</font><br/>";
echo"<font color='#c0b1a3'> Здоровье: ".n_f($a['hp'])."</font> <img src='/images/icon/vit.png'><br/>";
echo"<font color='#c0b1a3'>Награда: $a[exp] <img src='/images/icon/exp.png'>, + $a[krys] <img src='/images/bosses/diamond.png'>, + $a[gold] <img src='/images/icon/gold.png'></font><br/>";
echo"<div class='lines'></div>";
echo"<center><font color='#c0b1a3'>Требования:</font></center>";
echo"<center><font color='#c0b1a3'>Секретные ключи: $users[key_sekret]/10 <img src='/images/bosses/secret.png'></font></center><br/><br/>";
if($users['key_sekret'] > $attack_key_sekret){
echo"<div class='btn22' ><img src='/images/icon/sumstat.png'> <a href='/bosses.php?action=fight&id=$a[id]'>Атаковать</a></div>";
}
echo"</td></tr></tbody></table></div><div class='line'></div>";
}}
echo'<div class="main" style="text-align:left;">';
echo'<center><font color="#c0b1a3"><b>Убито боссов:</b></font></center><br/>';
echo'<font color="#c0b1a3">';
echo'Гоблин '.$users['kill_boss'].'<br/>';
echo'Троль '.$users['kill_boss2'].'<br/>';
echo'Глава Гоблинов '.$users['kill_boss3'].'<br/>';
echo'Глава Тролей '.$users['kill_boss4'].'<br/>';
echo'</font>';
echo'</div><div class="line"></div>';
break;
case 'fight':
$whe = mysql_fetch_assoc(mysql_query('SELECT * FROM `marisa_user` WHERE `user` = "'.$user['login'].'" LIMIT 1'));
if(!$whe){header('location: /bosses.php');exit;} //Проверка
$gde = mysql_fetch_array(mysql_query('SELECT * FROM `marisa_fight` WHERE `user` = "'.$user['login'].'" LIMIT 1'));
if($gde){
if($gde['time']<time()){
mysql_query('delete from `marisa_fight` where `user`="'.$user['login'].'"');
$_SESSION['err'] = 'Поражения (кончилось время)';
header('location: /bosses.php');
exit;
}}
$id = _string(_num($_GET['id']));
$me = mysql_fetch_assoc(mysql_query('SELECT * FROM `marisa_fight` WHERE `user` = "'.$user['login'].'" LIMIT 1'));
if(!$me){
if($id == 1){
mysql_query('Insert into `marisa_fight` set `time`="'.(time()+$time).'", `boss_name` = "Паук", `boss_hp` = "50000", `boss_hp_max` = "50000", `battle`="'.$id.'", `user` = "'.$user['login'].'", `hp` = "'.$user['hp'].'"');
}elseif($id == 2){
if($users['key_silver'] > $attack_key_silver){
mysql_query('Insert into `marisa_fight` set `time`="'.(time()+$time).'", `boss_name` = "Крыса", `boss_hp` = "100000", `boss_hp_max` = "100000", `battle`="'.$id.'", `user` = "'.$user['login'].'", `hp` = "'.$user['hp'].'"');
mysql_query('update `marisa_user` set `key_silver`=`key_silver`-"'.$attack_key_silver.'" where `user`="'.$user['login'].'"');
}else{
$_SESSION['err'] = 'Не хватает серебрянного ключа';
header('location: /bosses.php');
exit();
}}elseif($id == 3){
if($users['key_gold'] > $attack_key_gold){
mysql_query('Insert into `marisa_fight` set `time`="'.(time()+$time).'", `boss_name` = "Паук Броненосец", `boss_hp` = "250000", `boss_hp_max` = "250000", `battle`="'.$id.'", `user` = "'.$user['login'].'", `hp` = "'.$user['hp'].'"');
mysql_query('update `marisa_user` set `key_gold`=`key_gold`-"'.$attack_key_gold.'" where `user`="'.$user['login'].'"');
}else{
$_SESSION['err'] = 'Не хватает золотого ключа';
header('location: /bosses.php');
exit();
}}elseif($id == 4){
if($users['key_sekret'] > $attack_key_sekret){
mysql_query('Insert into `marisa_fight` set `time`="'.(time()+$time).'", `boss_name` = "Троль", `boss_hp` = "500000", `boss_hp_max` = "500000", `battle`="'.$id.'", `user` = "'.$user['login'].'", `hp` = "'.$user['hp'].'"');
mysql_query('update `marisa_user` set `key_sekret`=`key_sekret`-"'.$attack_key_sekret.'" where `user`="'.$user['login'].'"');
}else{
$_SESSION['err'] = 'Не хватает секретного ключа';
header('location: /bosses.php');
exit();
}}elseif($id == 5){
if($users['key_sekret'] > $attack_key_sekret){
mysql_query('Insert into `marisa_fight` set `time`="'.(time()+$time).'", `boss_name` = "Скелет Воин", `boss_hp` = "1000000", `boss_hp_max` = "1000000", `battle`="'.$id.'", `user` = "'.$user['login'].'", `hp` = "'.$user['hp'].'"');
mysql_query('update `marisa_user` set `key_sekret`=`key_sekret`-"'.$attack_key_sekret.'" where `user`="'.$user['login'].'"');
}else{
$_SESSION['err'] = 'Не хватает секретного ключа';
header('location: /bosses.php');
exit();
}}
$_SESSION['not'] = 'Битва началась!';
header('location: /bosses.php?action=fight&id='.$id.'');
exit();
}
$hp_users = round(100/($user['vit']/$me['hp'])); //Полоска
if($hp_users > 100) {$hp_users = 100;}
$hp_boss = round(100/($me['boss_hp_max']/$me['boss_hp'])); //Полоска
if($hp_boss > 100) {$hp_boss = 100;}
//Проверка серьёзная....
if($me['boss_hp'] < 10){
if($me['battle'] == '1'){
$nagr = mysql_fetch_assoc(mysql_query('SELECT * FROM `marisa` WHERE `id` = "'.$me['battle'].'"'));
$key = 1;
$key_img = 1;
$img_valyuta = 'money';
$valyuta = $nagr['serebro'];
mysql_query('update `marisa_user` set `key_silver`=`key_silver`+"'.$key.'", `kill_boss`=`kill_boss`+1 where `user`="'.$user['login'].'"');
mysql_query('update `users` set `g`=`g`+"'.$nagr['gold'].'" where `id`="'.$user['id'].'"');
mysql_query('update `users` set `s`=`s`+"'.$nagr['serebro'].'" where `id`="'.$user['id'].'"');
}elseif($me['battle'] == '2'){
$nagr = mysql_fetch_assoc(mysql_query('SELECT * FROM `marisa` WHERE `id` = "'.$me['battle'].'"'));
$key = 1;
$key_img = 2;
$img_valyuta = 'gold';
$valyuta = $nagr['gold'];
mysql_query('update `marisa_user` set `key_gold`=`key_gold`+"'.$key.'", `kill_boss2`=`kill_boss2`+1 where `user`="'.$user['login'].'"');
mysql_query('update `users` set `g`=`g`+"'.$nagr['gold'].'" where `id`="'.$user['id'].'"');
}elseif($me['battle'] == '3'){
$nagr = mysql_fetch_assoc(mysql_query('SELECT * FROM `marisa` WHERE `id` = "'.$me['battle'].'"'));
$key = 1;
$key_img = 2;
$img_valyuta = 'gold';
$valyuta = $nagr['gold'];
mysql_query('update `marisa_user` set `key_sekret`=`key_sekret`+"'.$key .'", `kill_boss3`=`kill_boss3`+1 where `user`="'.$user['login'].'"');
mysql_query('update `users` set `g`=`g`+"'.$nagr['gold'].'" where `id`="'.$user['id'].'"');
}elseif($me['battle'] == '4'){
$nagr = mysql_fetch_assoc(mysql_query('SELECT * FROM `marisa` WHERE `id` = "'.$me['battle'].'"'));
$key = ''.$nagr['krys'].'';
$key_img = 'diamond';
$img_valyuta = 'gold';
$valyuta = $nagr['gold'];
$share = ', <img src="/images/bosses/diamond.png"> '.$nagr['krys'].'';
mysql_query('update `marisa_user` set `key_excell`=`key_excell`+"'.$key.'", `kill_boss4`=`kill_boss4`+1 where `user`="'.$account['login'].'"');
mysql_query('update `users` set `g`=`g`+"'.$nagr['gold'].'" where `id`="'.$user['id'].'"');
}
//награда опыта,золот и т.д
$bosses = mysql_fetch_assoc(mysql_query('SELECT * FROM `marisa` WHERE `id` = "'.$me['battle'].'"'));
mysql_query('update `users` set `exp`=`exp`+"'.$nagr['exp'].'" where `id`="'.$user['id'].'"');
mysql_query('delete from `marisa_fight` where `user`="'.$user['login'].'"');
$_SESSION['not'] = 'Вы победили '.$me['boss_name'].'<br/>
Награда: '.$nagr['exp'].' <img src="/images/icon/exp.png">, + '.$key.' <img src="/images/bosses/'.$key_img.'.png">, ';
header('location: /bosses.php');
exit();
}
$vit= $user['vit']*2;
$hp_progress = round(100/($vit/$user['hp']));
if($exp_progress > 100) {
$exp_progress = 100;
}
echo'<div class="main"><div class="block_zero">';
echo"<font color='#c0b1a3'>$me[user]</font><br/>";
echo"<font color='#c0b1a3'>Здоровье: $user[hp]</font> <img src='/images/icon/vit.png'><br/>";
echo'<div style="background:lime;height:5px;width:100%;padding:0;margin:6px 0;font-size:5px">
<div style="background:red; height:5px; width:'.$hp_progress.'%;"></div></div></div></div><div class="line"></div>';
echo'<center><div class="main"><div class="block_zero">';
echo'<img src="/images/icon/sumstat.png"> <a href="/bosses.php?action=fight&id='.$id.'&ataka">Атаковать</a><br/>';
echo' <a href="/bosses.php?action=fight&id='.$id.'&arrow">Маг стрела</a><br/>';
echo'<a href="/bosses.php?action=fight&id='.$id.'&arrow_fire">Дождь огня</a>';
echo'</div></div><div class="line"></div></center>';
echo'<div class="main"><div class="block_zero">';
echo"<font color='#c0b1a3'>$me[boss_name]</font><br/>";
echo"<font color='#c0b1a3'>Здоровье: $me[boss_hp]/$me[boss_hp_max]</font> <img src='/images/icon/vit.png'><br/>";
echo'<div style="background:lime;height:5px;width:100%;padding:0;margin:6px 0;font-size:5px">
<div style="background:red; height:5px; width:'.$hp_boss.'%;"></div></div></div></div><div class="line"></div>';
echo'<div class="main"><div class="block_zero">';
echo'<font color="#c0b1a3">До поражения: '._time($gde['time']-time()).'</font>';
echo'</div></div><div class="line"></div>';
if(isset($_SESSION['atak'])){
echo "<div class='text center'>";
echo $_SESSION['atak'];
echo "</div><div class='line'></div>";
unset($_SESSION['atak']);
}
//Схема атаки
$dmg_u -= rand(round($user['def']/12), round($user['def']/7));
$dmg_u = rand(round($user['str']/6), round($user['str']/4));
if(isset($_GET['ataka'])){
if($user['mp'] < $mp){
$_SESSION['err'] = 'Недостаточно энерегии для удара.';
header('location: /bosses.php?action=fight&id='.$id.'');
exit();
}else{
mysql_query('update `marisa_fight` set `boss_hp`=`boss_hp`-"'.$dmg_u.'" where `user`="'.$user['login'].'"');
mysql_query('update `users` set `mp`=`mp`-"'.$mp.'" where `id`="'.$user['id'].'"');
mysql_query('update `users` set `hp`=`hp`-"'.$us_hp.'" where `id`="'.$user['id'].'"');
mysql_query('update `users` set `g`=`g`+"'.$g.'" where `id`="'.$user['id'].'"');
$_SESSION['atak'] = '<font color="lime">Вы ударили <b>'.$me['boss_name'].'</b> на <i>- '.$dmg_u.'</i></font>';
header('location: /bosses.php?action=fight&id='.$id.'');
exit();
}}
if(isset($_GET['arrow'])){
if($users['svitok'] > 0){
mysql_query('update `marisa_fight` set `boss_hp`=`boss_hp`-"'.$udar_mag.'" where `user`="'.$user['login'].'"');
mysql_query('update `marisa_user` set `svitok`=`svitok`-"1" where `user`="'.$user['login'].'"');
$_SESSION['atak'] = '<font color="blue">Вы ударили <b>'.$me['boss_name'].'</b> магическом ударом на <i>- '.$udar_mag.'</i></font>';
header('location: /bosses.php?action=fight&id='.$id.'');
exit();
}else{
$_SESSION['err'] = 'Ошибка у вас нет обычного свитка.<br/>
<a href="/bosses.php?action=magazin&one">Купить 1-шт свиток магического удара</a>';
header('location: /bosses.php?action=fight&id='.$id.'');
exit();
}}
if(isset($_GET['arrow_fire'])){
if($users['svitok_fire'] > 0){
mysql_query('update `marisa_fight` set `boss_hp`=`boss_hp`-"'.$udar_fire.'" where `user`="'.$user['login'].'"');
mysql_query('update `marisa_user` set `svitok_fire`=`svitok_fire`-"1" where `user`="'.$user['login'].'"');
$_SESSION['atak'] = '<font color="orange">Вы ударил огнем <b>'.$me['boss_name'].'</b> на <i>- '.$udar_fire.'</i></font>';
header('location: /bosses.php?action=fight&id='.$id.'');
exit();
}else{
$_SESSION['err'] = 'Ошибка у вас нет огненного свитка.<br/>
<a href="/bosses.php?action=magazin&one_fire">Купить 1-шт свиток огненного удара</a>';
header('location: /bosses.php?action=fight&id='.$id.'');
exit();
}}
break;
case 'magazin':
echo'<div class="main"><div class="block_zero">';
echo'<a href="/bosses.php?action=magazin&one">Купить 1 свиток магическое</a><br/>';
echo'<a href="/bosses.php?action=magazin&two">Купить 5 свиток магическое</a><br/>';
echo'<a href="/bosses.php?action=magazin&three">Купить 10 свиток магическое</a>';
echo'</div></div><div class="line"></div>';
echo'<div class="main"><div class="block_zero">';
echo'<a href="/bosses.php?action=magazin&one_fire">Купить 1 свиток огненное</a><br/>';
echo'<a href="/bosses.php?action=magazin&two_fire">Купить 5 свиток огненное</a><br/>';
echo'<a href="/bosses.php?action=magazin&three_fire">Купить 10 свиток огненное</a>';
echo'</div></div><div class="line"></div>';
echo'<div class="main" style="text-align:left;"><div class="block_zero">
<small><<</smal> <a href="/bosses.php">Вернуться к сражению</a></div></div></div><div class="line"></div>';
//инструкция покупки
if(isset($_GET['one'])){
if($user['g'] < $svitok_baks) {
$_SESSION['err'] = '<font color="red">У вас мало кристала</font>';
header('location: /bosses.php?action=magazin');
exit();
}else{
mysql_query('update `marisa_user` set `svitok`=`svitok`+"1" where `user`="'.$user['login'].'"');
mysql_query('update `users` set `g`=`g`-"'.$svitok_baks.'" where `id`="'.$user['id'].'"');
$_SESSION['not'] = '<font color="lime">Вы успешно купили +1 свиток магическое</font>';
header('location: /bosses.php?action=magazin');
exit();
}}
if(isset($_GET['two'])){
if($user['g'] < $svitok_baks2) {
$_SESSION['err'] = '<font color="red">У вас мало кристала</font>';
header('location: /bosses.php?action=magazin');
exit();
}else{
mysql_query('update `marisa_user` set `svitok`=`svitok`+"5" where `user`="'.$user['login'].'"');
mysql_query('update `users` set `g`=`g`-"'.$svitok_baks2.'" where `id`="'.$user['id'].'"');
$_SESSION['not'] = '<font color="lime">Вы успешно купили +5 свиток магическое</font>';
header('location: /bosses.php?action=magazin');
exit();
}}
if(isset($_GET['three'])){
if($user['g'] < $svitok_baks3) {
$_SESSION['err'] = '<font color="red">У вас мало кристала</font>';
header('location: /bosses.php?action=magazin');
exit();
}else{
mysql_query('update `marisa_user` set `svitok`=`svitok`+"10" where `user`="'.$user['login'].'"');
mysql_query('update `users` set `g`=`g`-"'.$svitok_baks3.'" where `id`="'.$user['id'].'"');
$_SESSION['not'] = '<font color="lime">Вы успешно купили +10 свиток магическое</font>';
header('location: /bosses.php?action=magazin');
exit();
}}
if(isset($_GET['one_fire'])){
if($user['g'] < $svitok_fire_baks) {
$_SESSION['err'] = '<font color="red">У вас мало кристала</font>';
header('location: /bosses.php?action=magazin');
exit();
}else{
mysql_query('update `marisa_user` set `svitok_fire`=`svitok_fire`+"1" where `user`="'.$user['login'].'"');
mysql_query('update `users` set `g`=`g`-"'.$svitok_fire_baks.'" where `id`="'.$user['id'].'"');
$_SESSION['not'] = '<font color="lime">Вы успешно купили +1 свиток огненное</font>';
header('location: /bosses.php?action=magazin');
exit();
}}
if(isset($_GET['two_fire'])){
if($user['g'] < $svitok_fire_baks2) {
$_SESSION['err'] = '<font color="red">У вас мало кристала</font>';
header('location: /bosses.php?action=magazin');
exit();
}else{
mysql_query('update `marisa_user` set `svitok_fire`=`svitok_fire`+"5" where `user`="'.$user['login'].'"');
mysql_query('update `users` set `g`=`g`-"'.$svitok_fire_baks2.'" where `id`="'.$user['id'].'"');
$_SESSION['not'] = '<font color="lime">Вы успешно купили +5 свиток огненное</font>';
header('location: /bosses.php?action=magazin');
exit();
}}
if(isset($_GET['three_fire'])){
if($user['g'] < $svitok_fire_baks3) {
$_SESSION['err'] = '<font color="red">У вас мало кристала</font>';
header('location: /bosses.php?action=magazin');
exit();
}else{
mysql_query('update `marisa_user` set `svitok_fire`=`svitok_fire`+"10" where `user`="'.$user['login'].'"');
mysql_query('update `users` set `g`=`g`-"'.$svitok_fire_baks3.'" where `id`="'.$user['id'].'"');
$_SESSION['not'] = '<font color="lime">Вы успешно купили +10 свиток огненное</font>';
header('location: /bosses.php?action=magazin');
exit();
}}
break;
} //закрытие волшебство
include './system/f.php'; //in share
?>