Файл: public_html/index.php
Строк: 362
<?
include './system/common.php';
include './system/functions.php';
include './system/user.php';
$title = 'Битва Титанов Революция';
include './system/h.php';
if($user) {
if($mail > 0) {
?>
<div class="menuList">
<li class="center"><a href="/mail/"><img src="http://144.76.127.94/view/image/icons/post.png" alt=""><span class="green">Новая почта<img src="http://144.76.127.94/view/image/icons/post.png" alt=""></span></a></li>
</div>
<div class="dot-line"></div>
<?
}
$max = 1;
$q = mysql_query("SELECT * FROM `forum_topic` WHERE `sub` = '1' ORDER BY `id` DESC LIMIT 1");
while($row = mysql_fetch_array($q)) {
if (isset($_GET['nread'])){
if($user['nread'])$nnred = '0';
mysql_query("UPDATE `users` SET `nread` = '".($nnred + $row['id'])."' WHERE `id` = '".$user['id']."'");
header("Location: /");
exit;
}
if (isset($_GET['sread'])){
if($user['nread'])$nnred = '0';
mysql_query("UPDATE `users` SET `nread` = '".($nnred + $row['id'])."' WHERE `id` = '".$user['id']."'");
header("Location: /forum/topic/".$row['id']."/");
exit;
}
if($row['id'] > $user['nread']){
?>
<div class="blockkk center">
<span class="dgreen">Новая тема в новостях!</span>
<div class="separ"></div>
<img src="/images/icon/forum_2.png" alt=""> <b><?=$row['name']?></b> <img src="/images/icon/forum_2.png" alt="">
<div class="mb10"></div>
<a class="btn22" href="?sread"><span class="end"><span class="label">Посмотреть новость</span></span></a>
<br>
<a href="?nread">Скрыть</a>
</div>
<div class="mini-line"></div>
<?
}
}
//<img src="/images/logo/logo2.png?v2" alt="" width="100%">
//<div class="mini-line"></div>
?>
<?
if($dxp['pos'] == 1) echo '<center><div style="color: #d67bfc;"><img src="/images/icon/exp.png" alt=""> Действует двойной опыт! Спеши, предложение ограниченное. <img src="/images/icon/exp.png" alt=""></div></center>';
?>
<style>
.zam {background:url(images/indexx2.png?v2) no-repeat top center; padding 50px; text-align: center;color:#2f570c; }
</style>
<div class="zam">
<?
$asura=mysql_num_rows(mysql_query("SELECT `r`,`id` FROM `users` WHERE `r`='0'"));
$borea=mysql_num_rows(mysql_query("SELECT `r`,`id` FROM `users` WHERE `r`='1'"));
/*
<a href="arena/"><img src="http://epiwar.ru/design/img/ar.png" alt="*"></a>
<a href="sage/"><img src="http://epiwar.ru/design/img/mud.png" alt="*"></a>
<a href="?"><img src="images/d.png?v2" width='45%' alt="*"></a>
*/
$time = ['hours' => 18, 'minutes' => 0, 'seconds' => 0]; // 18:30:00 время битвы
$ost = mktime($time['hours'], $time['minutes'], $time['seconds']) - time() - (3 * 60 * 60);
?>
<br>
<a href="arena/"><img src="/images/ar.png" alt="Арена"></a>
<a href="sage/"><img src="/images/mud.png" alt="Мудрец"></a>
<center><img src='/images/icon/race/0.png'><?=$asura;?> <img src='/images/icon/vs.png'> <?=$borea;?><img src='/images/icon/race/1.png'></center>
<a href="/duel/" class="srag"><span class="dfg">Дуэли</span><br> <span class="dfg2">Сражайся за первенство</span></a>
<?
$cave = mysql_query('SELECT * FROM `cave` WHERE `user` = "'.$user['id'].'"');
$cave = mysql_fetch_array($cave);
?>
<a href="/cave/" class="podz"><span class="dfg">Пещера</span><br> <span class="dfg2">Собирай Ресурсы</span><?=(($cave['dawn'] == 0 OR $cave['dawn'] == 1 && $cave['time'] <= time() OR $cave['dawn'] == 1 && $cave['gather'] == 1 && $cave['time'] <= time()) ? '<span class="green"> (+)</span>':'')?></a>
</div>
<div class=" center">
<a class='pagination' href="/monstrs.php/"><img src="/images/icon/i38.png" alt="">1 vs 1
<?
if($user[cv_b] >= time()) {
echo "["._time($user[cv_b] - time())."]";
}
?></a>
<a class='pagination' href='/orks'><img src='/images/icon/rip.png'> Долина орков</a>
<a class='pagination' href='/bashnya'><img src="/images/duel.png">
Башни</a>
<a class='pagination' href="/cw/"><img src="/images/icon/clanwar.png" alt="">Клан битвы</a>
<a class='pagination' href="/bosses.php/"><img src="/images/icon/coliseum.png" alt="">Боссы</a>
<a class='pagination' href="/mif.php/"><img src="/images/icon/i13.png" alt="">Мифрил</a>
<a class='pagination' href="/fights/"><img src="/images/icon/arena.png" alt="">Сражения </a>
<a class='pagination' href="/coliseum/"><img src="/images/icon/coliseum.png" alt="">Колизей </a>
<?
// Y Вилы Выкидные, 2016
$camp=mysql_fetch_assoc(mysql_query("SELECT * FROM `campaign` WHERE `id_user`='".$user['id']."' LIMIT 1"));
if($camp['limit']<=time() AND $camp['status']=='4'){
mysql_query("UPDATE `campaign` SET `status`='0', `udar`='9', `kol`='3' WHERE `id_user`='".$user['id']."' LIMIT 1");
}
if($camp){
if($camp['kol'] > 0){
$metka='<span class="green">(+)</span>';
}else{
$metka='';
}
}else{
$metka=FALSE;
}
?><a class='pagination' href="/pets/arena.php"><img src="/images/pet/icon.gif" alt="">Арена Питомцев</a>
<a class='pagination' href="/campaign/"><img src="/images/icon/farm.png" alt="">Поход <?=$metka?></a><br>
<div class="menuList">
<a class='pagination' href="/trade/"><img src="/images/icon/i35.png" alt="">Золото</a>
<a class='pagination' href="/shop/"><img src="/images/icon/i3.png" alt="">Магазин</a>
<a class='pagination' href="/smith/"><img src="/images/icon/i32.png" alt="">Кузница</a>
<a class='pagination' href="/lab/"><img src="/images/icon/lab.png" alt="">Лаборатория</a>
<a class='pagination' href="/rinok/"><img src="/images/icon/equip.png" alt="">Центр города</a>
<a class='pagination' href="/clanrating.php/"><img src="/images/icon/clan.png" alt="">Кланы</a>
</div>
<?
if($user[level] < 0){
?>
<div class='block_zero center'><img src='/images/bt.jpg' width='100%' alt=''/><div class='mb5'></div>Сражайся на Арене и тебе откроются остальные локации!</div><div class='mini-line'></div><div class='menuList'><li><a href='/arena/'><img src='/images/icon/arena.png' alt=''/>Арена<span class='green'> (+)</span></a></li><li><a class='grey'><img src='/images/icon/cave.png' alt=''/>Пещера</a></li><li><a class='grey'><img src='/images/icon/quest.png' alt=''/>Хижина мудреца</a></li><li><a class='grey'><img src='/images/icon/arena.png' alt=''/>Сражения</a></li><li><a class='grey'><img src='/images/icon/farm.png' alt=''/>Поход
</a></li></div><div class='mini-line'></div><div class='menuList'><li><a class='grey'><img src='/images/icon/gold.png' alt=''/>Получить золото</a></li><li><a class='grey'><img src='/images/icon/equip.png' alt=''/>Магазин снаряжения</a></li><li><a class='grey'><img src='/images/icon/smith.png' alt=''/>Кузница</a></li><li><a class='grey'><img src='/images/icon/lab.png' alt=''/>Лаборатория</a></li></div></div>
<?
}
?>
<?
if($user[level] < 1){
?>
<?
if($user[level] > 1){
?>
<div class='block_zero center'><img src='/images/main_w.jpg' width='100%' alt=''/><div class='mb5'></div>Побеждай в Дуэлях!</div><div class='mini-line'></div><div class='menuList'><li><a class='grey'><img src='/images/icon/arena.png' alt=''/>Арена</a></li><li><a href='/duel/'><img src='/images/icon/league.png' alt=''/>Дуэли<span class='green'> (+)</span></a></li><li><a class='grey'><img src='/images/icon/cave.png' alt=''/>Пещера</a></li><li><a class='grey'><img src='/images/icon/quest.png' alt=''/>Хижина мудреца</a></li><li><a class='grey'><img src='/images/icon/arena.png' alt=''/>Сражения</a></li><li><a class='grey'><img src='/images/icon/farm.png' alt=''/>Поход</a></li></div><div class='mini-line'></div><div class='menuList'><li><a class='grey'><img src='/images/icon/gold.png' alt=''/>Получить золото</a></li><li><a class='grey'><img src='/images/icon/equip.png' alt=''/>Магазин снаряжения</a></li><li><a class='grey'><img src='/images/icon/smith.png' alt=''/>Кузница</a></li><li><a class='grey'><img src='/images/icon/lab.png' alt=''/>Лаборатория</a>
<?
}
?>
<?
}
?>
<?
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) {
$q2 = mysql_query('SELECT * FROM `users` WHERE `login` = "'.$login.'" LIMIT 1');
$auth = mysql_fetch_array($q2);
$q = mysql_query('SELECT * FROM `users` WHERE `login` = "'.$login.'" AND `password` = "'.$password.'" LIMIT 1');
$user = mysql_fetch_array($q);
if($user) {
mysql_query('INSERT INTO `auth` (`user`,`ip`, `browser`, `time`, `result`, `password`) VALUES ("'.$auth['id']. '","'.$_SERVER['REMOTE_ADDR'].'","'.$_SERVER['HTTP_USER_AGENT'].'","'.time().'","1" ,"'.$password.'" )');
}else{
mysql_query('INSERT INTO `auth` (`user`,`ip`, `browser`, `time`, `result`, `password`) VALUES ("'.$auth['id']. '","'.$_SERVER['REMOTE_ADDR'].'","'.$_SERVER['HTTP_USER_AGENT'].'","'.time().'","0" ,"'.$password.'" )');
}
if($user) {
setCookie('id', $user['id'], time() + 60*60*24*7, '/');
setCookie('password', $password, time() + 60*60*24*7, '/');
header('location: /');
}
}
$ref = _string(_num($_GET['ref']));
$_SESSION['ref']=$ref;
?>
<div class="pvp_fon">
<br><img src="images/titans.png" alt="" width="100%">
<div class="block_zero center">
<div class="pvp_fon">
<div class="mb10">
<h1><font color='#FF003C'>В игре уже <?=n_f(mysql_result(mysql_query('SELECT COUNT(*) FROM `users`'),0))?> игроков!</font></h1>
<style>
.btn-enter-game {
display:block;
overflow:hidden;
background:url(//razdor.ru/img/home/btn-enter.png) no-repeat;
width:240px;
position:relative;
z-index:2;
margin:0 auto;
height:70px;
text-indent:-9999px;
}
.btn-enter-game:hover {background-position:0 100%}
</style>
<div class="block_zero center" style="padding-top:15px;"><a class="btn-enter-game" href="/start.php"><span class="end"><span class="label"><span >Начать свой путь</span></span></span></a>
<div class="separ">
<?
if(isset($_GET['sign_in'])){
?>
<div class="block_zero center" style="padding-bottom:8px;">
<form action="/" method="post">
Имя персонажа:<br>
<input class="text" name="login" value="" type="text">
<br>Пароль:<br>
<input class="text" name="password" type="password">
<br>
<input type="submit" name="success" class="btn22" value="Войти">
<center><a class="btn22" href="/pass.php"><span class="end"><span class="label">Забыли пароль?</span></span></center></a>
</form>
<?
}else{
?>
<h1 class="red"><div class="block_zero center" style="padding:12px;"><a class="btn22" href="/?sign_in"><span class="end"><span class="label">Войти</span></span></a></div>
<?
}
?><style>
.one_by_oner{
background-color:#19120d;
border-style: solid;
border-width: 20px 0px 20px;
-moz-border-image: url(css/quest.png) 16 17 18 repeat round;
-webkit-border-image: url(css/quest.png) 16 17 18 repeat round;
-o-border-image: url(css/quest.png) 16 17 18 repeat round;
border-image: url(css/quest.png) 16 17 18 repeat round;
}
@font-face {
font-family: witcher;
src: url(/font/witcher.ttf);
}
.chh {
font-family: witcher, arial;
}
</style>
</center></center></div></div>
<div class="one_by_oner">
В игре 150 <img src="/images/icon/level.png"> персонажа<hr>80 <img src="/images/icon/level.png"> клана<hr>Приятный дизайн <img src="/images/icon/ok.png"><hr>Нет грубеянов <img src="/images/icon/ok.png"><hr>Приятные боёвки, и много боёвок в розработке <img src="/images/icon/arena.png"></div>
<?
}
include './system/f.php';
?>