Файл: public_html/deadwar.php
Строк: 530
<?php
$title = 'Кладбище';
//-----Подключаем функции-----//
include './system/common.php';
include './system/functions.php';
include './system/user.php';
if(!$user) {header('location: /');exit;}
//-----Подключаем вверх-----//
include './system/h.php';
if($user['level'] > 2) {
$clan = mysql_fetch_assoc(mysql_query("SELECT * FROM `clans` WHERE `id` = '".$user['clan']."'"));
if($user['baf_time'] == 1){
$tm = 5;}else{$tm = 10;}
$opponent_hp = round(rand(($user['n'] / 10),($user['n'] / 4)));
$gen = rand(1,3);
if($user['ability_1'] == 1 && $gen == 2){
$attak = 3;
$atta = rand(1,5);
if($atta == 1){$goo ='Ультра удар';}
elseif($atta == 2){$goo ='';}
elseif($atta == 3){$goo ='';}
elseif($atta == 4){$goo ='Удар мастера';}
elseif($atta == 5){$goo ='Удар ученика';}
$attak2 = round(rand($user['s'] / 2, $user['s']));
$bz = " <img src='/images/ability/1.0.png' alt='*'/><font color=lime>Мега удар! ".$goo."</font> ";
}
else
{
$atta = rand(1,5);
if($atta == 1){$goo ='';}
elseif($atta == 2){$goo ='Удар в голову';}
elseif($atta == 3){$goo ='';}
elseif($atta == 4){$goo ='Удар по торсу';}
elseif($atta == 5){$goo ='Удар по ногам';}
$attak = 0;
$attak2 = 1;
$bz = "<font color=White> ".$goo."</font>";
}
if($user['str'] >= 50 && $user['str'] <= 120){$death2 = rand(1,2);}
elseif($user['str'] >= 121 && $user['str'] <= 320){$death2 = rand(1,3);}
elseif($user['str'] >= 321 && $user['str'] <= 700){$death2 = rand(1,4);}
elseif($user['str'] >= 701 && $user['str'] <= 1000){$death2 = rand(1,5);}
elseif($user['str'] >=1001 && $user['str'] <= 10500){$death2 = rand(1,6);}
elseif($user['str'] >=2001 && $user['str'] <= 11500){$death2 = rand(1,7);}
elseif($user['str'] >=3001 && $user['str'] <= 15500){$death2 = rand(1,8);}
$death = round($death2 + $attak);
$member = mysql_query('SELECT * FROM `klad_boi` WHERE `user` = "'.$user['id'].'" ORDER BY `id` DESC LIMIT 1');
$member = mysql_fetch_array($member);
$battle = mysql_query('SELECT * FROM `klad` WHERE `id` = "'.$member['battle'].'"');
$battle = mysql_fetch_array($battle);
if($member['exit'] == 0 && $battle['end'] == 0 && ($battle['start'] == 1 or $battle['start'] == 2 or $battle['start'] == 3)) {
$titans = mysql_result(mysql_query('SELECT COUNT(*) FROM `klad_boi` WHERE `dead` = "0" AND `battle` = "'.$battle['id'].'"'),0);
if($titans <= 0) {
mysql_query('UPDATE `klad` SET `end` = "1" WHERE `id` = "'.$battle['id'].'"');
header('location: /deadwar/');
exit;
}
if($battle['koldun'] == 1 && $battle['time'] < time() && $battle['start'] == 3) {
mysql_query('UPDATE `klad` SET `end` = "1" WHERE `id` = "'.$battle['id'].'"');
mysql_query('UPDATE `klad` SET `koldun` = "0", `params` = "0" WHERE `id` = "'.$battle['id'].'"');
header('location: /deadwar/');
exit;
}
if($battle['koldun'] == 0 && $battle['time'] > time() && $battle['start'] == 3) {
mysql_query('UPDATE `klad` SET `end` = "1" WHERE `id` = "'.$battle['id'].'"');
mysql_query('UPDATE `klad` SET `koldun` = "0", `params` = "0" WHERE `id` = "'.$battle['id'].'"');
header('location: /deadwar/');
exit;
}
if($battle['time'] < time() && $battle['start'] == 1) {
mysql_query('UPDATE `klad` SET `end` = "1" WHERE `id` = "'.$battle['id'].'"');
header('location: /deadwar/');
exit;
}
if($battle['opponents'] < 1 && $battle['start'] == 1) {
mysql_query('UPDATE `klad` SET `start` = "2", `time` = "'.(time() + 30).'" WHERE `id` = "'.$battle['id'].'"');
header('location: /deadwar/');
exit;
}
if($battle['time'] < time() && $battle['start'] == 2) {
mysql_query('UPDATE `klad` SET `koldun` = "1", `params` = "'.($titans * rand(8925,12034)).'" WHERE `id` = "'.$battle['id'].'"');
mysql_query('UPDATE `klad` SET `start` = "3", `time` = "'.(time() + (60 * 10)).'" WHERE `id` = "'.$battle['id'].'"');
header('location: /deadwar/');
exit;
}
if($_GET['regen'] == true && ($battle['time'] > time() && $battle['start'] == 2)) {
mysql_query('UPDATE `users` SET `hp` = "'.($user['vit'] * 1).'" WHERE `id` = "'.$user['id'].'"');
header('location: /deadwar/');
$_SESSION['not'] = 'Успешно восстановлено!';
}
if($battle['time'] > time() && $battle['start'] == 2) {
?>
<div class='header'><font color='indianred'><span style='float: right;'> начало через: <?=_time($battle['time'] - time())?></span> </font><font color='lightblue'>Кладбище(Отдых)</font><div class='separ5'></div><center><img src='/images/klad/koldun.png'><br><font color=indianred>Ожидание битвы....</font> </center><div class='hr'></div></div></b>
<?php
if($user['hp'] < $user['vit']){
?>
<div class='div class'><center><div class="link_center"><a href='?regen=true'>Восстановиться</a></div></center></div>
<?php
}
?>
<div class='header'><center>
<div class="link_center"><a href='?'>Обновить</a></div><br><div class='hr'></div><font color=orange> Рыцарь не должен забывать о том, что на великих битвах требуется много здоровья и выносливости и на бой следует идти подготовившись...</font>
</center></div>
<?php
}
if($battle['time'] > time() && $battle['start'] == 3) {
?>
<div class='header'><font color='indianred'><span style='float: right;'> до поражения: <?=_time($battle['time'] - time())?></span> </font><font color='lightblue'>Кладбище(Колдун)</font><div class='separ5'></div><center><img src='/images/klad/koldun.png'><br>Здоровье колдуна: <img src='/images/icon/dead.png' alt='*'/> <font color=indianred><b><?=$battle['params']?></b></font> </center><div class='hr'></div></b>
<center>
<?php
if($member['dead'] == 0) {
if(isset($_GET['koldun']) && $battle['start'] == 3) {
if($member['time4'] > time()) {
header('location: ?');
exit;
}
$att2 = round(rand(($user['str']/4),($user['str'])));
$att = round($att2 + $attak2);
$dir = round(rand(($user['def'] / 25),($user['def'] / 19)));
if($att > $battle['params']) {
mysql_query('UPDATE `klad_boi` SET `user_kill` = "1" WHERE `user` = "'.$user['id'].'" AND `battle` = "'.$battle['id'].'"');
mysql_query('UPDATE `klad` SET `koldun` = "0", `params` = "0" WHERE `id` = "'.$battle['id'].'"');
header('location: ?');
}
if($att > 0 && $att < $battle['params']) {
mysql_query('UPDATE `users` SET `hp` = "'.($user['hp'] - $dir).'" WHERE `id` = "'.$user['id'].'"');
mysql_query('UPDATE `klad` SET `params` = "'.($battle['params']-$att).'" WHERE `id` = "'.$battle['id'].'"');
mysql_query('UPDATE `klad_boi` SET `time4` = "'.(time() + $tm).'",
`dmg` = "'.($member['dmg'] + $att).'" WHERE `user` = "'.$user['id'].'" AND `battle` = "'.$battle['id'].'"');
if($battle['params'] - 1 == 0) {
header('location: /deadwar/');
}
}
if($user['z'] <= 5) {
mysql_query('UPDATE `klad_boi` SET `dead` = "1" WHERE `user` = "'.$user['id'].'" AND `battle` = "'.$battle['id'].'"');
if($titans - 1 == 0) {
header('location: /deadwar/');
}
}
/////////////
if($att > 0){
?>
<img src='/images/arka.png' alt='*'/> <font color='lightblue'>Вы нанесли <font color=lightgreen><?=$att?> урона</font><?=$bz?> <br/>
<img src='/images/icon/dead.png' alt='*'/> <font color='indianred'> Потеряно <b><?=$dir?></b> здоровья </font></font>
</center>
<?php
}
?>
<?php
?>
</div>
<?php
}
else
{
?>
<div class='hr'></div>
<?php
}
?>
<div class='header'>
<center>
<img src='/images/icon/race/1.png' alt='*'/><img src='/images/icon/race/0.png' alt='*'/> Титановцы: <b><?=$titans?></b> <b> -VS- </b> <img src='/images/icon/dead.png' alt='*'/> Колдун: <b><?=$battle['params']?></b><br></b></font>
</center>
<?php
?>
<center><br/><div class="link_center"><a href='?koldun'><img src='/images/icon/dead.png' alt='*'/> Атаковать <img src='/images/icon/dead.png' alt='*'/> </a></div></span></span></center>
<br/></div>
<?php
?>
<center>
<?php
if($member['time4'] > time()) {
?>
<font color='#DC143C'><b>Вы промахнулись....</b><br/></font>Ударьте через: <font color=lightgreen><?=($member['time4'] - time())?> сек..</font> </center></div>
<?php
}
?>
</div>
<?php
}
else
{
?>
<div class='header'><font color='indianred'><span style='float: right;'> до поражения: <?=_time($battle['time'] - time())?></span> </font><font color='lightblue'>Кладбище(Колдун)</font><div class='separ5'></div><center><img src='/images/klad/koldun.png'><br><font color=indianred>Здоровье колдуна <img src='/images/icon/dead.png' alt='*'/> <b><?=$battle['params']?></b></font> </center><div class='hr'></div></b>
<center>
<div class="link_center"><a href='?'>Обновить</a></div>
</center>
<center><font color='#DC143C'>Вы пали на этом поле боя, ожидайте окончания схватки</font></center>
</div>
<div class='header'><center>
<div class="link_center">
<a href='?'>Обновить</a></div><br><div class='separ5'></div><font color=orange> Рыцарь не должен забывать о том, что на великих битвах требуется много здоровья и выносливости и на бой следует идти подготовившись...</font>
</center></div>
<?php
}
}
else
{
?>
<?php
////
if($battle['time'] > time() && $battle['start'] == 1) {
?>
<div class='header'><font color='indianred'><span style='float: right;'>до поражения: <?=_time($battle['time'] - time())?></span> </font><font color='lightblue'>Кладбище(Истребление)</font><div class='separ5'></div><center><img src='/images/klad/boi.png'><br><font color=indianred>Мертвецы атакуют....</font> </center><div class='separ5'></div></div></b>
<?php
if($member['dead'] == 0) {
if($_GET['attack'] == true && $battle['opponents'] > 0) {
if($member['time'] > time()) {
header('location: /deadwar/');
exit;
}
if($user['ablitity_1'] == 1 && $gen == 2){
$uro =round(rand(($user['str']/4),($user['str'])));
$uron =round($uro + $attak);
}
else
{
$uron2 =round(rand(($user['agi']/4),($user['agi'])));
$uron = round($uron2 + $attak2);
if($uron < 0) {
$uron = 0;
}
}
$opponent_uron =round(rand(($user['def']/14),($user['def'] / 17)));
if($opponent_uron < 0) {
$opponent_uron = 0;
}
if($uron > $opponent_hp) {
mysql_query('UPDATE `klad_boi` SET `kills` = "'.($member['kills']+$death).'" WHERE `user` = "'.$user['id'].'" AND `battle` = "'.$battle['id'].'"');
mysql_query('UPDATE `klad` SET `opponents` = "'.($battle['opponents'] - $death).'" WHERE `id` = "'.$battle['id'].'"');
if($battle['opponents'] - 1 == 0) {
header('location: /deadwar/');
}
if($user['klad_time'] == 0){
if($user['klad_kills'] > 50){
mysql_query('UPDATE `users` SET `klad_kills` = "'.($user['klad_kills'] = 50).'" WHERE `id` = "'.$user['id'].'"');
}
else
{
mysql_query('UPDATE `users` SET `klad_kills` = "'.($user['klad_kills'] + $death).'" WHERE `id` = "'.$user['id'].'"');
}
}
}
mysql_query('UPDATE `klad_boi` SET `time` = "'.(time() + $tm).'",
`dmg` = "'.($member['dmg'] + $uron).'" WHERE `user` = "'.$user['id'].'" AND `battle` = "'.$battle['id'].'"');
mysql_query('UPDATE `users` SET `klad_kill` = "'.($user['klad_kill'] + $death).'" WHERE `id` = "'.$user['id'].'"');
$_hp = round($opponent_uron / 2);
if($opponent_uron > 0) {
mysql_query('UPDATE `users` SET `hp` = "'.($user['hp'] - $_hp).'" WHERE `id` = "'.$user['id'].'"');
}
if($user['hp'] <= 5) {
mysql_query('UPDATE `klad_boi` SET `dead` = "1" WHERE `user` = "'.$user['id'].'" AND `battle` = "'.$battle['id'].'"');
if($titans - 1 == 0) {
header('location: /deadwar/');
}
}
if($uron > $opponent_hp) {
?>
<div class='header'>
<center><img src='/images/arka.png' alt='*'/> <font color='lime'>Вы ударили <font color=lihtblue>на <?=$uron?></font><?=$bz?> <br> Ударом уничтожено<font color=lihtblue> <b><?=$death?> мертвецов!</b></font> <br/>
<img src='/images/icon/dead.png' alt='*'/> <font color='indianred'> - <b><?=$opponent_uron?></b> здоровья </font></font></center>
</div>
<?php
}
?>
<?php
?>
</div>
<?php
}
else
{
?>
<div class='hr'></div>
<?php
}
?>
<div class='header'>
<center>
<img src='/images/icon/race/1.png' alt='*'/><img src='/images/icon/race/0.png' alt='*'/> Титановцы: <b><?=$titans?></b> <b> -VS- </b> <img src='/images/icon/dead.png' alt='*'/> Мертвецы: <b><?=$battle['opponents']?></b><br><font color =green>Вами убито:</font> <font color=lightgreen><b><?=$member['kills']?></b></font>
</center>
<?php
if($user['hp'] < $user['vit'] / 8) {
if($_GET['vost'] == true) {
if($user['g'] < 15){
header('Location: ?');
$_SESSION['err'] = 'Нужно больше золота!';
exit();
}else{
mysql_query('UPDATE `users` SET `g` = "'.($user['g']-15).'", `hp` = "'.($user['vit'] * 1).'" WHERE `id` = "'.$user['id'].'"');
header('location: /deadwar/');
$_SESSION['not'] = 'Успешно восстановлено!';
}
}
?>
<center><div class="link_center"><a href='/deadwar/?vost=true'>Восстановиться <img src="/images/icon/gold.png">15</a></div></center>
<?php
}
else
{
?>
<center><br/><div class="link_center"><a href='/deadwar/?attack=true'><img src='/images/icon/dead.png' alt='*'/> Атаковать <img src='/images/icon/dead.png' alt='*'/> </a></div></center>
<?php
}
?>
<br/>
<center>
<?php
if($member['time'] > time()) {
?>
<font color='#DC143C'><b>Вы промахнулись....</b><br/></font>Ударьте через: <font color=lightgreen><?=($member['time'] - time())?> сек..</font> </center>
<?php
}
?>
</div>
<?php
}
else
{
?>
<div class='hr'></div>
<div class='header'>
<center>
<img src='/images/attak.png' alt='*'/> Титановцы <b><?=$titans?></b> VS <img src='/images/icon/dead.png' alt='*'/> Мертвецы: <b><?=$battle['opponents']?></b>
</center>
<center>
<div class="link_center"><a href='?'>Обновить</a></div>
</center>
<center><font color='#DC143C'>Вы пали на этом поле боя, ожидайте окончания схватки</font></center>
</div>
<?php
}
}
}
}
else
{
?>
<?php
if($member['exit'] == 0 && $battle['end'] == 1 && ($battle['start'] == 1 or $battle['start'] == 2 or $battle['start'] == 3)) {
?>
<div class='header'>
<?php
$titans = mysql_result(mysql_query('SELECT COUNT(*) FROM `klad_boi` WHERE `dead` = "0" AND `battle` = "'.$battle['id'].'"'),0);
if($titans == 0 && $battle['opponents'] > 0 OR $battle['opponents'] > 0 OR $battle['time'] < time()&& $battle['start'] == 3) {
$_gs = round($member['kills'] / 8);
if($_gs <= 0){$_g = 1;}else{
$_g = round($member['kills'] / 8);
}
$_ser = round(15 * ($member['kills']+1));
$_exps = round(3 * ($member['kills']+1));
$kri = round($member['kills']/8);
if($kri <= 0){$kris = 1;}else{
$kris = round($member['kills']/8);
}
if($user['baf'] == 1){
$se = round($_ser / 4);
$ex = round($_exps / 4);
}
else
{
$se = 1;
$ex = 1;
}
$sera = round($_ser + $se);
$expn = round($_exps + $ex);
if($user['idol'] > 0){
$expx = ($expn + ($user['idol'] / 3));
$expz = ($expn + ($user['idol']));
$clan_exps = round($expz + $expn);
$_exp = round($expx + $expn);
}else{
if($user['idol'] == 0)
$clan_exps = $expn;
$_exp = $expn;
}
?>
<center><img src='/images/arka.png' alt='*'/> <font color='Indianred'><b>Все рыцари перебиты...</b></font> <img src='/images/arka.png' alt='*'/><br><img src='/images/klad/porajenie.png'></center>
<?php
}
else
{
$_gs = round($member['kills'] / 4);
if($_gs <= 0){$_g = 1;}else{
$_g = round($member['kills'] / 4);
}
if($member['user_kill'] == 1) {
$_g = round($_g + 75);
}
$_ser = round(30 * ($member['kills']+1));
$_exps = round(8 * ($member['kills']+1));
$kri = round($member['kills']/5);
if($kri <= 0){$kris = 1;}else{
$kris = round($member['kills']/5);
}
if($user['baf'] == 1){
$se = round($_ser / 4);
$ex = round($_exps / 4);
}
else
{
$se = 1;
$ex = 1;
}
$sera = round($_ser + $se);
$expn = round($_exps + $ex);
if($user['idol'] > 0){
$expx = ($expn + ($user['idol'] / 2));
$expz = ($expn + ($user['idol']));
$clan_exps = round($expz + $expn);
$_exp = round($expx + $expn);
}else{
if($user['idol'] == 0)
$clan_exps = $expn;
$_exp = $expn;
}
?>
<center><img src='/images/arka.png' alt='*'/> <font color='Lightgreen'><b>Тьма рассеяна...</b></font> <img src='/images/arka.png' alt='*'/><br><img src='/images/klad/pobeda.png'></center>
<?php
}
?>
</div>
<div class='header'>
<center><font color='#98FB98'>Награда:</font> <br/><img src='/images/gold.png' alt='*'/> <?=$_g?> золота <img src='/images/sera.png' alt='*'/> <?=$sera?> серебра <br/><img src='/images/exp.png' alt='*'/> <?=$_exp?> опыта<br/></center>
</div>
<?php
if($member['exit'] == 0 && $battle['end'] == 1 && ($battle['start'] == 1 or $battle['start'] == 2 or $battle['start'] == 3)) {
?>
<div class='header'>
<font color='#90b0c0'><b>Ваши достижения:</b></font><br/>
<?php
if($member['user_kill'] == 1) {
?>
<img src='/images/icon/dead.png' alt='*'/> <font color='lightgreen'></font><b> Поздравляем! Вы убили колдуна!</b><br/>
<?php
}
?>
<img src='/images/attak.png' alt='*'/> Вами убито <img src='/images/icon/dead.png' alt='*'/> -<font color='red'><?=$member['kills']?>-</font> Мертвецов!<br/>
<img src='/images/attak.png' alt='*'/> Ваш урон: <font color='gold'><?=$member['dmg']?></font><br/>
<br>
</div>
<?php
?>
<div class='header'><center><b>Лучшие рыцари битвы:</b></center><br/></div>
<?php
if($_GET['prodo'] == true) {
if($member['exit'] == 0) {
mysql_query('UPDATE `users` SET `g` = "'.($user['g'] + $_g).'",
`s` = "'.($user['s'] + $sera).'", `kladbishe` = "0",
`exp` = "'.($user['exp'] + $_exp).'" WHERE `id` = "'.$user['id'].'"');
if($user['clan'] > 0){
mysql_query("update `clans` set `exp` = `exp` + ".$clan_exps.", `quest_deadwar` = `quest_deadwar`+1 where (`id` = '".$user['clan']."')");
}
mysql_query('UPDATE `klad_boi` SET `exit` = "1" WHERE `battle` = "'.$battle['id'].'" AND `user` = "'.$user['id'].'"');
mysql_query('UPDATE `klad_boi` SET `exit2` = "0" WHERE `battle` = "'.$battle['id'].'" AND `user` = "'.$user['id'].'"');
mysql_query("DELETE FROM `klad_boi` WHERE `user` = '".$user['id']."'");
header('location: ?');
$_SESSION['not'] = "Награда получена!!";
exit();
}
}
$q2 = mysql_query('SELECT * FROM `klad_boi` WHERE `battle` = "'.$battle['id'].'" ORDER BY `user_kill` DESC, `dmg` DESC LIMIT 1');
while($row2 = mysql_fetch_array($q2)) {
$us2 = mysql_query('SELECT * FROM `users` WHERE `id` = "'.$row2['user'].'"');
$usr2 = mysql_fetch_array($us2);
if($row2['user_kill'] == 1){
?>
<div class='header'><center><img src='/images/icon/dead.png'/><b><font color=indianred>Колдуна убил</font> <?=$usr2['login']?></b> <font color=gold>+75 золота</font> <br/><div class='separ3'></div></center>
</div>
<?php
}
}
$q = mysql_query('SELECT * FROM `klad_boi` WHERE `battle` = "'.$battle['id'].'" ORDER BY `kills` DESC, `dmg` DESC LIMIT 10');
while($row = mysql_fetch_array($q)) {
$us = mysql_query('SELECT * FROM `users` WHERE `id` = "'.$row['user'].'"');
$usr = mysql_fetch_array($us);
if($row['kills'] > 0){
?>
<div class='header'><center><img src='/images/1.png'/><b> <?=$usr['login']?></b></a> - Убитo <img src='/images/icon/dead.png' alt='*'/> <?=$row['kills']?> Мертвецов <img src='/images/attak.png'/> Общий урон-<?=$row['dmg']?> <br/><div class='linetop'></div></center>
</div>
<?php
}
}
?>
<div class='header'><br><center><div class="link_center"><a href='?prodo=true'>Забрать награду</a></div></div></center>
<?php
}
else
{
?>
<div class='hr'></div>
<?php
}
}
$battle = mysql_query('SELECT * FROM `klad` WHERE `start` = "0"');
$battle = mysql_fetch_array($battle);
if(!$battle) {
$h = date('H',time());
if($h > 24 && $h < 0)
{
$time = 30799;
}
else
{
$time = 30799;
}
mysql_query('INSERT INTO `klad` (`time`) VALUES ("'.time().'")');
}
if(($member['exit'] == 1) or ($member['exit'] == 0 and $member['exit2'] == 0)){
?>
<center><div class='header'><font color=orange>~Великая битва ,,Кладбище,,!~</font><div class='separ'></div><img src='/images/klad/start.png'><div class='separ3'></div><font color='lightblue'>Говорят.. на этом кладбище несколько сотен лет назад был захоронен страшный колдун!<br>Говорят... что,последователи колдуна воскресили его и он, бродит всю ночь по мёртвой земле!<br>Говорят.. что, все захороненые тут...воскресли, и теперь, страшного колдуна сопровождает полчище мертвецов!</font> <div class='hr'></div></center>
</div><div class='header'><center>
<?php
if($user['kladbishe'] == 1){
?>
<b><font color='gray'>..::Будут учавствовать.. </font></b><b><font color='#DCDCDC'>-<?=mysql_result(mysql_query('SELECT COUNT(*) FROM `klad_boi` WHERE `battle` = "'.$battle['id'].'"'),0)?>- </font><font color='gray'>Рыцарей света!::..</font></b><br/>
<?php
}
?>
<font color='#FFEBCD'>Битва проходит в: 12:00, 20:00 и 23:00 по времени игры!</font></br>
<i>Ожидание боя...</i></center></div>
<div class='header' align='center'>
<?php
if($member['battle'] != $battle['id'] && $user['kladbishe'] == 1) {
if($_GET['enter'] == true) {
mysql_query('INSERT INTO `klad_boi` (`battle`,`user`,`time`) VALUES ("'.$battle['id'].'","'.$user['id'].'","'.time().'")');
mysql_query('UPDATE `klad` SET `opponents` = "'.($battle['opponents'] + rand(50,95)).'" WHERE `id` = "'.$battle['id'].'"');
mysql_query('UPDATE `klad_boi` SET `exit` = "0" WHERE `battle` = "'.$battle['id'].'" AND `user` = "'.$user['id'].'"');
header('location: /deadwar');
}
?>
<div class="link_center"><a href='/deadwar/?enter=true'><img src='/images/icon/dead.png' alt='*'/> Я готов к бою <img src='/images/icon/dead.png' alt='*'/></a></div><br><div class='hr'></div><font color=orange> Рыцарь не должен забывать о том, что на великих битвах требуется много здоровья и выносливости и на бой следует идти подготовившись...</font>
<?php
}
else
{
if($member['battle'] == $battle['id']) {
?>
<div class='header'><center><font color=lightgreen>Вы участвуете в грядущей битве!</font><br>
<div class="link_center"><a href='?'>Обновить</a></div><br><div class='hr'></div><font color=orange> Рыцарь не должен забывать о том, что на великих битвах требуется много здоровья и выносливости и на бой следует идти подготовившись...</font>
</center></div>
<div class="menu_link">
<a href="/fights">Вернуться назад</a></div>
<?php
}
else
{
?>
<div class='header'><center><font color=indianred>Подать заявку на бой можно за пол часа до начала битвы!</font><br>
<div class="link_center"><a href='?'>Обновить</a></div><br><div class='separ5'></div><font color=orange> Рыцарь не должен забывать о том, что на великих битвах требуется много здоровья и выносливости и на бой следует идти подготовившись...</font>
</center></div>
<div class="menu_link">
<a href="/fights">Вернуться назад</a></div>
<?php
}
}
}
?>
</div>
<?php
}
}
else
{
?>
<div class='title' style='background:url(555);'><?=$title?></div>
<div class='hr'></div>
<div class='header' align='center'>
Для участии в <img src='/images/icon/dead.png' alt='*'/> В схватке с тьмой <img src='/images/icon/level.png' alt='*'/>требуется 3 уровень
</div>
<?php
}
include './system/f.php';
?>