Файл: public_html/modules/towers/index.php
Строк: 162
<?php
$root = $_SERVER['DOCUMENT_ROOT'];
include_once ($root.'/core/base.php');
falseauth();
$header = "Башни";
include_once ($root.'/core/head.php');
?>
<style>
.bg_tower {
background-image: url(/images/bg-big-tower.jpg);
background-repeat: no-repeat;
background-position: 50% 0;
padding-bottom: 5px;
}
.pb15 {
padding-bottom: 15px;
}
.sqr_img3 {
display: inline-block;
text-decoration: none !important;
font-size: 0;
vertical-align: top;
background-position: 0px 2px;
background-repeat: no-repeat;
}
.c_d1 {
color: #d1d1d1 !important;
}
.bg50 {
background-repeat: no-repeat;
width: 50px;
height: 50px;
}
.ml5 {
margin-left: 5%;
margin-top: 5px;
}
.fl {
float: left;
}
.c_white {
color: white !important;
}
.mt3 {
margin-top: 3px;
color: #ffffff;
}
.cntr {
text-align: center;
}
.tdn {
text-decoration: none !important;
}
.bold {
font-weight: bold;
}
.ml65 {
margin-left: 80px;
color: #ffffff;
}
.pt5 {
padding-top: 15px;
padding-bottom: 10px;
}
.pr12 {
padding-right: 15px;
}
.si_tower_small {
background-image: url(/images/small_tower.png);
padding-bottom: 2px;
}
.si_small_frame {
}
.small {
font-size: small !important;
}
</style>
<?
$time=time();
echo'<script type="text/javascript" src="/js/camp.js"></script>';
$tower = $db->query("SELECT * FROM `towers` WHERE `user` = '".$u['id']."'")->fetch_object();
//'.($tower->gremlin_level == 0 ? '<a href="/towers/gremlin">Купить гремлина</a>' : '<a href="/towers/gremlin">Улучшить до '.($tower->gremlin_level+1).' уровня</a>').'
$gremlinParams = getGremlinParams($tower->gremlin_level, $tower->wizard_level);
$hunterParams = getHunterParams($tower->hunter_level, $tower->wizard_level);
$dailyGems = $tower->gremlin_level+$tower->hunter_level;
if($u['level'] >= 10)
{
if($tower->gremlin_dg == 0) $gremlin_dg = $tower->gremlin_level;
else $gremlin_dg = 0;
echo '
'.($tower->gremlin_level > 0 ? ' <a href="/towers/gremlin"><div class="notice_container"><div class="gborder notice_alert alert-success">Гремлин ('.$tower->gremlin_level.' ур. из 15 ур.)</div></div></a>' : ' <a href="/towers/gremlin"><div class="notice_container"><div class="gborder notice_alert alert-success">Гремлин не куплен</div></div></a>').'
<a href="/towers/gremlin"><div class = "b-mini">
<table width="100%">
<tbody><tr>
<td width="60px" valign="top">
<img width="50px" height="50px" src="/images/towers/gremlin.png">
</td>
<td valign="top">
<a href="/towers/gremlin"><font color="white">Гремлин</font></a>
'.($tower->gremlin_level > 0 ? '<div class="txt">'.($tower->gremlin_time <= time() ? 'Доход: <img src="/images/silver.png" width="16" height="16"> '.$gremlinParams['currentIncome'].' '. ($gremlin_dg > 0 ? 'и <img src="/images/ic-gem.png" width="16" height="16"> '.$gremlin_dg.' ' : '').'<br><br><a class = "btn _blue" href="/towers/gremlin/get">Собрать</a>' : 'Доход через <span id="timer_1">'.tl($tower->gremlin_time-time())).'</span><script type="text/javascript" language="javascript">timer('.($tower->gremlin_time - time()).','."'timer_1'".','.($tower->gremlin_time).','.$time.')</script></div>' : '').'
</td>
</tr>
</tbody></table><br>
</div></a>
';
}
if($u['level'] >= 15)
{
if($tower->hunter_dg == 0) $hunter_dg = $tower->hunter_level;
else $hunter_dg = 0;
echo '
'.($tower->hunter_level > 0 ? '<a href="/towers/hunter"><div class="notice_container"><div class="gborder notice_alert alert-success">Охотник ('.$tower->hunter_level.' ур. из 15 ур.)</div></div></a>' : '<a href="/towers/hunter"><div class="notice_container"><div class="gborder notice_alert alert-success">Охотник не куплен</div></div></a>').'
<a href="/towers/hunter"><div class = "b-mini"><table width="100%">
<tbody><tr>
<td width="60px" valign="top">
<img width="50px" height="50px" src="/images/towers/hunter.png">
</td>
<td valign="top">
<a href="/towers/hunter"><font color="white">Охотник</font></a>
'.($tower->hunter_level > 0 ? '<div class="txt">'.($tower->hunter_time <= time() ? 'Доход: <img src="/images/silver.png" width="16" height="16"> '.$hunterParams['currentIncome'].' '. ($hunter_dg > 0 ? ' и <img src="/images/ic-gem.png" width="16" height="16"> '.$hunter_dg.'' : '').'<br><br><a class = "btn _blue" href="/towers/hunter/get">Собрать</a>' : 'Доход через <span id="timer_2">'.tl($tower->hunter_time-time())).'</span><script type="text/javascript" language="javascript">timer('.($tower->hunter_time - time()).','."'timer_2'".','.($tower->hunter_time).','.$time.')</script></div>' : '<div class="txt"> Не куплен</div>').'
</td>
</tr>
</tbody></table><br>
</div></a>';
}
echo '
<div class="bg_tower">
<div class="ml5 sqr_img3 si_tower_small fl bg50"><div class="si_small_frame bg50"></div></div>
<div class="ml65">
<table><tr>
<td style="white-space: nowrap;width:100%;">
<span class="ttu bold c_white">Башня мага</span>
<div class="mt3 bold">Уровень: '.$tower->wizard_level.' из 40</div></td>
<td class="pr12 pt5 cntr">
<a class="tdn" href="/towers/wizard" >
<img class="" src="/images/btn-up-green.png" width="34" height="34" alt=""/>
<span class="nwr bold"></span>
</a>
</td>
</tr></table>
</div></div>
';
if($dailyGems > 0) echo '<div class="notice_container"><div class="gborder notice_alert alert-success">Гемов получено: '.$tower->daily_gold.' из '.$dailyGems.'</div></div>';
include_once ($root.'/core/foot.php');