Файл: public_html/modules/campaign/found.php
Строк: 33
<?php
$root = $_SERVER['DOCUMENT_ROOT'];
include_once ($root.'/core/base.php');
falseauth();
$header = "Поход";
include_once ($root.'/core/head.php');
?>
<style>
.index-fight {
padding-top: 60px;
background: #343434 url(/images/campaign/fight.png) top center no-repeat;
display: block;
height: auto;
margin: 0;
}
</style>
<?
$issetCampaign = $db->query("SELECT * FROM `campaign_battle` WHERE `user` = '".$u['id']."'");
if($issetCampaign->num_rows == 0) redirect('/trip');
$iC = $issetCampaign->fetch_object();
if($iC->status == 'battle') redirect('/trip/battle');
$types = ['Орка', 'Гоблина', 'Драгса', 'Гнома'];
if(isset($_GET['start']))
{
if($issetCampaign->num_rows == 0) redirect('/trip');
$db->query("UPDATE `campaign_battle` SET `time` = '".(time()+300)."', `status` = 'battle' WHERE `id` = '".$iC->id."'");
redirect('/trip/battle');
}
echo '<div class="b">
<center>
<font color = "lime">Вы обнаружили <big><b>'.$types[$iC->type].'</b></big> <img src="/images/health.png" width="35 height="35"> <b><big>'.$iC->mob_health.'</big></b></font></br>
<img src="/images/campaign/mob-'.$iC->type.'.png" width="50%"><br>
</center>
</div>';
echo '<div class="b"><center><a href="?start"></br>
<div class = "index-fight"></div></div>';
echo '<div class="line"></div>';
include_once ($root.'/core/foot.php');