Файл: colxoz.ru/index.php
Строк: 173
<?
include './system/common.php';
include './system/functions.php';
include './system/user.php';
$title = 'Colxoz.ru';
include './system/h.php';
if($user) {
if($mail > 0) {
?>
<div class='list'>
<li><a href='/mail/'>Новая почта</a></li>
</div>
<?
}
?>
<div class='' align=''><span style='text-shadow:none;'></span><div class='center'><img src='/images/logo/logo3.jpg' alt='' width='100%'/></div>
<div class='list a'>
<li><a href='/arena/' style='display: block;' class='menu_link'><img src='/images/icon/arena.png' alt='*'/> Арена <?=($user['mp'] > 0 ? '<font color='#30c030'>(+)</font>':'')?></a></li>
<?
if($user['level'] > 4) {
?>
<li><a href='/duel/' style='display: block;' class='menu_link'><img src='/images/icon/league.png' alt='*'/> Дуэли <?=($user['duel_fights'] > 0 ? '<font color='#30c030'>(+)</font>':'')?></a></li>
<?
}
if($user['level'] > 9) {
?>
<li><a href='/coliseum/' style='display: block;' class='menu_link'><img src='/images/icon/coliseum.png' alt='*'/> Колизей</a></li>
<?
}
$undying = mysql_query('SELECT * FROM `undying` WHERE `start` = "0" LIMIT 1');
$undying = mysql_fetch_array($undying);
?>
<li><a href='/undying/' class='menu_link'><img src='/images/icon/bar.png' alt='*'/> Долина бессмертных
<?
if($undying) {
$undying_time = round(($undying['time'] - time()) / 3600);
if($undying_time > 1) {
?>
<font color='#909090'>(< <?=$undying_time?> час<?=($undying_time > 1 ? 'ов':'а')?>)</font>
<?
}
else
{
?>
<font color='#909090'>(<?=_time(($undying['time'] - time()))?>)</font>
<?
}
}
?>
</a></li>
<?
$cave = mysql_query('SELECT * FROM `cave` WHERE `user` = "'.$user['id'].'"');
$cave = mysql_fetch_array($cave);
?>
<li class='no_b'><a href='/cave/' class='menu_link'><img src='/images/icon/cave.png' alt='*'/> Пещера <?=(($cave['dawn'] == 0 OR $cave['dawn'] == 1 && $cave['time'] <= time() OR $cave['dawn'] == 1 && $cave['gather'] == 1 && $cave['time'] <= time()) ? '<font color="#30c030">(+)</font>':'')?></a></li>
</div>
<div class='list'>
<li><a href='/boss' style='display: block;' class='menu_link'><img src='http://tiwar.ru/images/icon/hellworld.png' alt='*'/> Боссы</a></li>
</div>
<div class='line'></div>
<div class='list'>
<li><a href='/worldkassa/buy.php' style='display: block;' class='menu_link'><img src='/images/icon/gold.png' alt='*'/> Получить золото<small></small></a></li>
<li><a href='/shop/' style='display: block;' class='menu_link'><img src='/images/icon/equip.png' alt='*'/> Магазин снаряжения</a></li>
<li><a href='/nabeg.php' style='display: block;' class='menu_link'><img src='http://tiwar.ru/images/icon/clanwar.png' alt='*'/> Набег</a></li>
<?
if($user['level'] > 2) {
?>
<li><a href='/farm/' style='display: block;' class='menu_link'><img src='/images/icon/farm.png' alt='*'/> Поход
<?
$farm = mysql_query('SELECT * FROM `farm` WHERE `user` = "'.$user['id'].'"');
$farm = mysql_fetch_array($farm);
if(!$farm OR $farm['h'] == 0 && $farm['time'] == 0 OR $farm['h'] > 0 && $farm['time'] <= time()) {
?>
<font color='#30c030'>(+)</font>
<?
}
}
?>
</a></li>
<li><a href='/smith/' style='display: block;' class='menu_link'><img src='/images/icon/smith.png' alt='*'/> Кузница</a></li>
<li class='no_b'><a href='/lab/' style='display: block;' class='menu_link'><img src='/images/icon/lab.png' alt='*'/> Лаборатория</a></li>
</div>
<div class='line'></div>
<div class='list'>
<li><a href='/clans/' style='display: block;' class='menu_link'><img src='/images/icon/clan.png' alt='*'/> Кланы</a></li>
<li class='no_b'><a href='/rating/' style='display: block;' class='menu_link'><img src='/images/icon/user.png' alt='*'/> Зал славы</a></li>
</div>
<?
if(isSet($_GET['exit'])) {
setCookie('id', '');
setCookie('password', '');
header('location: /');
}
}
else
{
$login = _string($_POST['login']);
$login = strToLower($login);
$password = _string($_POST['password']);
if($login && $password) {
$q = mysql_query('SELECT * FROM `users` WHERE `login` = "'.$login.'" AND `password` = "'.$password.'" LIMIT 1');
$user = mysql_fetch_array($q);
if($user) {
setCookie('id', $user['id'], time() + 86400, '/');
setCookie('password', $password, time() + 86400, '/');
header('location: /');
}
}
$ref = _string(_num($_GET['ref']));
?>
<div class='content' align='center'><span style='text-shadow:none;'></span><div class='center'><img src='/images/logo/logo3.jpg' alt='' width='100%'/></div>
<font color='#666666'><small>Бонус 100000 <img src='/images/icon/gold.png'> и 50000 <img src='/images/icon/silver.png'> при регистрации!</font></small>
<center><a href='/start/<?=$ref?>/' class=' '><img src='http://elem.mobi/img/start7.png'></a><br/></div></center>
<div class='line'></div>
<div class='content' align='center'>
<form action='/' method='post'>
Ник в игре:<br/> <input name='login'/><br/>
Пароль:<br/><input name='password'/><br/>
<input type='submit' class='button' value='Войти'/>
</form><center><br>
<img src='http://tiwar.ru/images/icon/2hit.png'><b> Описание игры </b><img src='http://tiwar.ru/images/icon/2hit.png'></center><br>
<small>Окунись в бескрайние сражения двух расс Римлян и Викингов. Развивай своего героя и стань великим!</div></small>
<?
}
include './system/f.php';
?>