Файл: public_html/system/h.php
Строк: 570
<?
ob_start();
list($msec,$sec)
= explode(chr(32), microtime());
$gtime = $sec+$msec;
?>
<!DOCTYPE html PUBLIC '-//WAPFORUM//DTD XHTML Mobile 1.0//EN' 'http://www.wapforum.org/DTD/xhtml-mobile10.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta name="theme-color" content="#000000">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<meta http-equiv='content-type' content='text/html; charset=UTF-8'/>
<meta name="yandex-verification" content="57867511fec9bdf3" />
<meta name='author' content='semdan'/>
<meta name='keywords' content='битва титанов, титаны, онлайн игра, тивар, tiwar, MMORPG, semdan, Битва Титанов Революция'/>
<meta name='viewport' content='width=device-width; minimum-scale=1; maximum-scale=1'/>
<link rel='stylesheet' type='text/css' href='/../css/mresh.css?vvvv222H22G44h566<?=rand(4444444444,66666666666666666666666)?>'/>
<script type="text/javascript" async="" data-rocketsrc="https://mc.yandex.ru/metrika/watch.js" data-rocketoptimized="true"></script>
<script type="text/javascript">
function clock() {
var d = new Date();
var month_num = d.getMonth()
var day = d.getDate();
var hours = d.getHours();
var minutes = d.getMinutes();
var seconds = d.getSeconds();
month=new Array("", "", "", "", "", "",
"", "", "", "", "", "");
if (day <= 9) day = "0" + day;
if (hours <= 9) hours = "0" + hours;
if (minutes <= 9) minutes = "0" + minutes;
if (seconds <= 9) seconds = "0" + seconds;
date_time = " "+ hours + ":" + minutes + ":" + seconds;
if (document.layers) {
document.layers.doc_time.document.write(date_time);
document.layers.doc_time.document.close();
}
else document.getElementById("doc_time").innerHTML = date_time;
setTimeout("clock()", 1000);
}
</script>
<style>
.btn22 {
position: relative;
border: ridge 1px #000000;
color: rgb(198, 222, 221);
background-color: #001925;
margin: 2px;
margin-top: 4px;
color: #ffffff;
padding: 4px;
border-radius:8px;
text-align: center;
display: inline-block;
text-decoration:none !important;
}
.btn2{
margin:1px;
background-image:url(http://213.239.195.28/xaos/style5/btn.png);
border:1px solid #131313;
color:white;
text-align:center;
text-decoration:none;
display:inline-block;
height:18px;
padding:2px;
padding-left:10px;
padding-right:10px;
border-radius:3px;
font-size:14px;
}
.btn22:hover {
background-image:url(http://213.239.195.28/xaos/style2/btn6.png);
text-decoration:none !important;
}
a:hover {
text-decoration:none !important;
}
.one_by_one{
/*19120d*/
background-color:#00000d;
border-style: solid;
border-width: 12px 1px 12px;
-moz-border-image: url(http://btvar.ru/css/quest.png) 18 17 18 repeat round;
-webkit-border-image: url(http://btvar.ru/css/quest.png) 16 17 18 repeat round;
-o-border-image: url(http://btvar.ru/css/quest.png) 16 17 18 repeat round;
border-image: url(http://btvar.ru/css/quest.png) 16 17 18 repeat round;
}
textarea{
font-size: 13px;
width: 100%;
border-radius: 4px;
color: #C6DEDD;
background: #3F3F3F;
padding: 2px;
height: 3pc;
margin: 1px;
border: 3px solid #525152;
}
header{
padding-bottom: 3px;
font-size: 15px;
text-align: center;
color: #BEBEBE;
text-shadow: 1px 1px 1px black;
background-color: #191919;
}
a.pagination {
box-shadow: 0 3px 0 #130d0d;
text-shadow:#760000 0px 1px 0px;
display: inline-block;
color: #fff;
font-size: 14px;
display: inline-block;
text-decoration: none;
padding:12px 17px;
outline: none;
margin-top: 5px;
margin-left: 3px;
margin-right: 2px;
border: 1px solid #000000;
border-radius: 9px;
transition: 0.2s;
background: url(/system/d.png?v6) top repeat-x #4e2759;
width: 35%
}
</style>
<link rel='icon' href='/favicon.ico' type='image/x-icon'/>
<link rel='shortcut icon' href='/favicon.ico' type='image/x-icon'/>
<title><?=$title?></title>
</head>
<body>
<?
$tit= 'Ошибка 404';
if($title !==$tit){
mysql_query('UPDATE `users` SET `self` = "'.$title.'" WHERE `id` = "'.$user['id'].'"');
}
mysql_query('UPDATE `users` SET `agent` = "'.detect_browser().'" WHERE `id` = "'.$user['id'].'"');
mysql_query('UPDATE `users` SET `self2` = "'.$_SERVER['HTTP_REFERER'].'" WHERE `id` = "'.$user['id'].'"');
if($user) {
switch($user['level']) {
case 1:
$exp = 30;
break;
case 2:
$exp = 50;
break;
case 3:
$exp = 90;
break;
case 4:
$exp = 195;
break;
case 5:
$exp = 298;
break;
case 6:
$exp = 388;
break;
case 7:
$exp = 512;
break;
case 8:
$exp = 881;
break;
case 9:
$exp = 1282;
break;
case 10:
$exp = 1932;
break;
case 11:
$exp = 2287;
break;
case 12:
$exp = 3045;
break;
case 13:
$exp = 4756;
break;
case 14:
$exp = 6390;
break;
case 15:
$exp = 8927;
break;
case 16:
$exp = 11960;
break;
case 17:
$exp = 14515;
break;
case 18:
$exp = 19023;
break;
case 19:
$exp = 25966;
break;
case 20:
$exp = 32553;
break;
case 21:
$exp = 39951;
break;
case 22:
$exp = 47205;
break;
case 23:
$exp = 58995;
break;
case 24:
$exp = 70894;
break;
case 25:
$exp = 85995;
break;
case 26:
$exp = 99192;
break;
case 27:
$exp = 120172;
break;
case 28:
$exp = 146240;
break;
case 29:
$exp = 180991;
break;
case 30:
$exp = 201027;
break;
case 31:
$exp = 240016;
break;
case 32:
$exp = 273061;
break;
case 33:
$exp = 299979;
break;
case 34:
$exp = 350000;
break;
case 35:
$exp = 500000;
break;
case 36:
$exp = 600000;
break;
case 37:
$exp = 725000;
break;
case 38:
$exp = 850000;
break;
case 39:
$exp = 975000;
break;
case 40:
$exp = 1100000;
break;
case 40:
$exp = 1100000;
break;
case 41:
$exp = 1225000;
break;
case 42:
$exp = 1350000;
break;
case 43:
$exp = 1475000;
break;
case 44:
$exp = 1600000;
break;
case 45:
$exp = 1725000;
break;
case 46:
$exp = 1850000;
break;
case 47:
$exp = 1975000;
break;
case 48:
$exp = 2100000;
break;
case 49:
$exp = 2225000;
break;
case 50:
$exp = 2500000;
break;
case 51:
$exp = 2700000;
break;
case 52:
$exp = 2900000;
break;
case 53:
$exp = 3100000;
break;
case 54:
$exp = 3300000;
break;
case 55:
$exp = 3500000;
break;
case 56:
$exp = 3700000;
break;
case 57:
$exp = 3900000;
break;
case 58:
$exp = 4100000;
break;
case 59:
$exp = 4500000;
break;
case 60:
$exp = 20000000;
break;
case 61:
$exp = 25000000;
break;
case 62:
$exp = 30000000;
break;
case 63:
$exp = 35000000;
break;
case 64:
$exp = 40000000;
break;
case 65:
$exp = 45000000;
break;
case 66:
$exp = 50000000;
break;
case 67:
$exp = 55000000;
break;
case 68:
$exp = 60000000;
break;
case 69:
$exp = 65000000;
break;
case 70:
$exp = 70000000;
break;
case 71:
$exp = 75000000;
break;
case 72:
$exp = 80000000;
break;
case 73:
$exp = 85000000;
break;
case 74:
$exp = 90000000;
break;
case 75:
$exp = 100000000;
break;
case 76:
$exp = 105000000;
break;
case 77:
$exp = 106000000;
break;
case 78:
$exp = 107000000;
break;
case 79:
$exp = 108000000;
break;
case 80:
$exp = 109000000;
break;
case 81:
$exp = 119000000;
break;
case 82:
$exp = 129000000;
break;
case 83:
$exp = 139000000;
break;
case 84:
$exp = 149000000;
break;
case 85:
$exp = 159000000;
break;
case 86:
$exp = 169000000;
break;
case 87:
$exp = 179000000;
break;
case 88:
$exp = 189000000;
break;
case 89:
$exp = 200000000;
break;
case 90:
$exp = 300000000;
break;
case 91:
$exp = 400000000;
break;
case 92:
$exp = 500000000;
break;
case 93:
$exp = 600000000;
break;
case 94:
$exp = 700000000;
break;
case 95:
$exp = 800000000;
break;
case 96:
$exp = 900000000;
break;
case 97:
$exp = 1000000000;
break;
case 98:
$exp = 2000000000;
break;
case 99:
$exp = 3000000000;
break;
case 100:
$exp = 5000000000;
break;
//.....................//
case 101:
$exp = 10000000000;
break;
case 102:
$exp = 20000000000;
break;
case 103:
$exp = 40000000000;
break;
case 104:
$exp = 80000000000;
break;
case 105:
$exp = 160000000000;
break;
case 106:
$exp = 320000000000;
break;
case 107:
$exp = 640000000000;
break;
case 108:
$exp = 1240000000000;
break;
case 109:
$exp = 2000000000000;
break;
case 110:
$exp = 4000000000000;
break;
case 111:
$exp = 8000000000000;
break;
case 112:
$exp = 16000000000000;
break;
case 113:
$exp = 32000000000000;
break;
case 114:
$exp = 64000000000000;
break;
case 115:
$exp = 120000000000000;
break;
case 116:
$exp = 200000000000000;
break;
case 117:
$exp = 400000000000000;
break;
case 118:
$exp = 800000000000000;
break;
//--------------------//08.06.2017
case 119:
$exp = 1600000000000000;
break;
case 120:
$exp = 3200000000000000;
break;
case 121:
$exp = 6400000000000000;
break;
case 122:
$exp = 12400000000000000;
break;
case 123:
$exp = 24000000000000000;
break;
case 124:
$exp = 44000000000000000;
break;
case 125:
$exp = 84000000000000000;
break;
case 126:
$exp = 164000000000000000;
break;
case 127:
$exp = 324000000000000000;
break;
case 128:
$exp = 644000000000000000;
break;
case 129:
$exp = 1240000000000000000;
break;
case 130:
$exp = 2400000000000000000;
break;
case 131:
$exp = 8400000000000000000;
break;
case 132:
$exp = 16400000000000000000;
break;
case 133:
$exp = 32400000000000000000;
break;
case 134:
$exp = 64000000000000000000;
break;
case 135:
$exp = 64000000000000000000;
break;
case 136:
$exp = 124000000000000000000;
break;
case 137:
$exp = 240000000000000000000;
break;
case 138:
$exp = 400000000000000000000;
break;
case 139:
$exp = 800000000000000000000;
break;
case 140:
$exp = 1600000000000000000000;
break;
case 141:
$exp = 6000000000000000000000;
break;
case 142:
$exp = 12000000000000000000000;
break;
case 143:
$exp = 20000000000000000000000;
break;
case 144:
$exp = 40000000000000000000000;
break;
case 145:
$exp = 80000000000000000000000;
break;
case 146:
$exp = 160000000000000000000000;
break;
case 147:
$exp = 320000000000000000000000;
break;
case 148:
$exp = 320000000000000000000000;
break;
case 149:
$exp = 640000000000000000000000;
break;
case 150:
$exp = 1200000000000000000000000;
break;
}
$exp_progress = round(100/($exp/$user['exp']));
if($exp_progress > 100) {
$exp_progress = 100;
}
function clan_exp($i) {
switch($i) {
case 1:
$clan_exp = 30;
break;
case 2:
$clan_exp = 58;
break;
case 3:
$clan_exp = 111;
break;
case 4:
$clan_exp = 210;
break;
case 5:
$clan_exp = 394;
break;
case 6:
$clan_exp = 732;
break;
case 7:
$clan_exp = 1346;
break;
case 8:
$clan_exp = 2449;
break;
case 9:
$clan_exp = 4408;
break;
case 10:
$clan_exp = 7846;
break;
case 11:
$clan_exp = 13808;
break;
case 12:
$clan_exp = 24025;
break;
case 13:
$clan_exp = 41323;
break;
case 14:
$clan_exp = 70249;
break;
case 15:
$clan_exp = 118018;
break;
case 16:
$clan_exp = 195909;
break;
case 17:
$clan_exp = 321290;
break;
case 18:
$clan_exp = 520489;
break;
case 19:
$clan_exp = 832782;
break;
case 20:
$clan_exp = 1315795;
break;
case 21:
$clan_exp = 2052640;
break;
case 22:
$clan_exp = 3161065;
break;
case 23:
$clan_exp = 4804818;
break;
case 24:
$clan_exp = 7207227;
break;
case 25:
$clan_exp = 10666695;
break;
case 26:
$clan_exp = 15573374;
break;
case 27:
$clan_exp = 22425658;
break;
case 28:
$clan_exp = 31844434;
break;
case 29:
$clan_exp = 44582207;
break;
case 30:
$clan_exp = 61500000;
break;
case 31:
$clan_exp = 83700000;
break;
case 32:
$clan_exp = 112100000;
break;
case 33:
$clan_exp = 148000000;
break;
case 34:
$clan_exp = 192400000;
break;
case 35:
$clan_exp = 246300000;
break;
case 36:
$clan_exp = 310300000;
break;
case 37:
$clan_exp = 310400000;
break;
case 38:
$clan_exp = 310500000;
break;
case 39:
$clan_exp = 310600000;
break;
case 40:
$clan_exp = 310700000;
break;
case 41:
$clan_exp = 310800000;
break;
case 42:
$clan_exp = 320888888;
break;
case 43:
$clan_exp = 430000000;
break;
case 44:
$clan_exp = 530000000;
break;
case 45:
$clan_exp = 630000090;
break;
case 46:
$clan_exp = 730000000;
break;
case 47:
$clan_exp = 830000000;
break;
case 48:
$clan_exp = 930000000;
break;
case 49:
$clan_exp = 950000000;
break;
case 50:
$clan_exp = 1000000000;
break;
case 51:
$clan_exp = 1000500000;
break;
case 52:
$clan_exp = 1100000000;
break;
case 53:
$clan_exp = 1200000000;
break;
case 54:
$clan_exp = 1300000000;
break;
case 55:
$clan_exp = 1400000000;
break;
case 56:
$clan_exp = 1500000000;
break;
case 57:
$clan_exp = 1600000000;
break;
case 58:
$clan_exp = 1800000000;
break;
case 59:
$clan_exp = 2000000000;
break;
case 60:
$clan_exp = 2500000000;
break;
case 61:
$clan_exp = 3000000000;
break;
case 62:
$clan_exp = 3000000000;
break;
case 63:
$clan_exp = 6000000000;
break;
case 64:
$clan_exp = 12000000000;
break;
case 65:
$clan_exp = 24000000000;
break;
case 66:
$clan_exp = 48000000000;
break;
case 67:
$clan_exp = 96000000000;
break;
case 68:
$clan_exp = 200000000000;
break;
case 69:
$clan_exp = 400000000000;
break;
case 70:
$clan_exp = 800000000000;
break;
case 71:
$clan_exp = 1600000000000;
break;
case 72:
$clan_exp = 3200000000000;
break;
case 73:
$clan_exp = 6400000000000;
break;
case 74:
$clan_exp = 12800000000000;
break;
case 75:
$clan_exp = 25600000000000;
break;
case 76:
$clan_exp = 51200000000000;
break;
case 77:
$clan_exp = 101200000000000;
break;
case 78:
$clan_exp = 201200000000000;
break;
case 79:
$clan_exp = 401200000000000;
break;
case 80:
$clan_exp = 800000000000000;
break;
case 81:
$clan_exp = 1600000000000000;
break;
case 82:
$clan_exp = 3200000000000000;
break;
//....................//
}
return $clan_exp;
}
$lvlclan = $clan['level'] + 1;
$time = time();
if($clan && $clan['level'] < 80 && $clan['exp'] >= clan_exp($clan['level'])) {
mysql_query('UPDATE `clans` SET `level` = `level` + 1,
`exp` = "0" WHERE `id` = "'.$clan['id'].'"');
mysql_query("INSERT INTO `chat` (`clan`,
`user`,
`text`,
`time`) VALUES ('$clan[id]',
'2',
'<span class=dgreen>Ваш клан получил $lvlclan уровень</span>',
'$time')");
}
$mail = mysql_result(mysql_query('SELECT COUNT(*) FROM `mail` WHERE `to` = "'.$user['id'].'" AND `read` = "0"'),0);
//$mails = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `mail` WHERE `to` = "'.$user['id'].'" AND `read` = "0"'));
$mails = mysql_query('SELECT * FROM `mail` WHERE `to` = "'.$user['id'].'" AND `read` = "0"');
$mails = mysql_fetch_array($mails);
$_chat = mysql_result(mysql_query('SELECT COUNT(*) FROM `chat` WHERE `clan` = "0" AND `to` = "'.$user['id'].'" AND `read` = "0"'),0);
$mod_chat = mysql_result(mysql_query('SELECT COUNT(*) FROM `mod_chat` WHERE `to` = "'.$user['id'].'" AND `read` = "0" '),0);
if($_SERVER['PHP_SELF'] == '/index.php')$title = 'Главная';
if($_SERVER['PHP_SELF'] == '/clan.php')$title = 'Клан';
?>
<img src="http://btvar.ru/images/pims2.png" style="width:100%; margin-bottom: -1px;">
<div class="main" style="word-wrap:break-word;"><span style="text-shadow:none;"></span>
<div class="head header cntr" style="position:relative;" onclick="location.href="/"">
<span class="ttl fl"><?=$title?></span>
<span class="bl rght nwr">
<?if($mail > 0) {
?><a href="/mail/<?=$mails['from']?>/"><img src="http://144.76.127.94/view/image/icons/post.png" alt=""></a> | <?}
if($_chat > 0) {?><a href="/chat_lenta/"><img src="http://213.239.195.28/xaos/16x16/add.png">
</a>
<?}
if($mod_chat > 0) {?><a href="/moder_chat/"><img src="http://213.239.195.28/xaos/16x16/add.png">
</a> | <?}?>
<img src="/images/icon/vit.png" alt="hp"> <span class="white"><?=$user['hp']?></span> | <img src="/images/icon/mana.png" alt="mp"> <?=$user['mp']?></span>
</span></span><div class="clr"></div>
</div>
<div class="exp_bar"><div class="progress" style="width:<?=$exp_progress?>%"></div></div>
<?
// колизей
$battle = mysql_query('SELECT * FROM `coliseum_ob` WHERE `id` = "1"');
$battle = mysql_fetch_array($battle);
//pvp
$pvp = mysql_query('SELECT * FROM `pvp_event` WHERE `start` = "0"');
$pvp = mysql_fetch_array($pvp);
if($pvp['time'] > '".time()."'){
?><a href="//btvar.ru/pvp.php"><center><font color='orange'>В pvp Кто-то Есть</font></center></a> <?
}elseif($battle['time'] < '".(time() +15)."'){
?><a href="/coliseum/"><center><font color='lime'>В колизее Кто-то Есть</font></center></a> <?
}else{
/*?><small>
<center><font color="lime">Время</font><font color="orange"> <?=date('H:i:s')?></font> <font color="red"><script language="JavaScript"> day = new Date(); hour = day.getHours(); if (hour>=5 && hour<12) greeting = "Доброе утро"; else { if (hour>=12 && hour<18) greeting = "Добрый день"; else { if (hour>=18 && hour<24) greeting = "Добрый вечер"; else { if (hour>=0 && hour<5) greeting = "Доброй ночи"; } } } document.write(greeting); </script></font> <img src="/smiles/mini_ulibka.gif"></center></small>
<script type="text/javascript">
clock();
</script>
<?*/
}
///////////////////////////////////////////////////
?>
<style>
.feedback {
padding: 4px;
text-align:center;
margin: 4px;
border: 1px solid #058B07;
border-radius:4px;
}
.feedback2 {
padding: 4px;
text-align:center;
margin: 4px;
border: 1px solid #8B0505;
border-radius:4px;
}
</style>
<?
////// мод сообщенька
if(isset($_SESSION['msg'])){
echo '<div class="feedback">'.$_SESSION['msg'].'</div>';
unset($_SESSION['msg']);
}
///// мод ошибка
if(isset($_SESSION['err'])){
echo '<div class="feedback2">'.$_SESSION['err'].'</div>';
unset($_SESSION['err']);
}
////////////////////////////////////////////////////////////////
if($user['level'] < 149 && $user['exp'] >= $exp) {
$lvluser = ($user[level] + 1);
$g = 10 + ($user['level'] * 5) - 5;
mysql_query('UPDATE `users` SET `level` = `level` + 1,
`exp` = "0",
`hp` = "'.($user['vit'] * 2).'",
`mp` = "'.$user['mana'].'",
`g` = "'.($user['g'] + $g).'" WHERE `id` = "'.$user['id'].'"');
if($clan_memb['user'] > 0) {
mysql_query("INSERT INTO `chat` SET `clan`='".$clan['id']."',`text`=' [color=lime]".$user[login]." [/color] [color=violet]получил ".($user[level] + 1)." уровень! , поздравляем!!!![/color]', `time`='".time()."'");
$_SESSION['msg'] = '<div class="pvp_fon"><center> <font color="orange"><img src="/images/icon/ok.png">Поздравляем<br>Вы получили <img src="/images/icon/level.png"> '.$lvluser.' уровень!<br> Награда '.$g.' <img src="/images/icon/gold.png"> золота!</font></center></div>';
}
?>
?>
<?
}
if($clan) {
$clan_msg = mysql_fetch_array(mysql_query('SELECT * FROM `clan_msg` WHERE `clan` = "'.$clan['id'].'" AND `time` >= "'.$clan_memb['time'].'" ORDER BY `time` DESC LIMIT 1'));
if($clan_msg && mysql_result(mysql_query('SELECT COUNT(*) FROM `clan_msg_read` WHERE `msg` = "'.$clan_msg['id'].'" AND `user` = "'.$user['id'].'"'),0) == 0 ) {
$clan_msg_user = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$clan_msg['user'].'"'));
if($_GET['clan_msg_read'] == true) {
mysql_query('INSERT INTO `clan_msg_read` (`msg`,`user`) VALUES ("'.$clan_msg['id'].'","'.$user['id'].'")');
header('location: ?');
}
?>
<div class="blockkk center">
<b>Клановое объявление</b>
<br><?=$clan_msg['text']?><br>
Отправитель: <img src="/images/icon/race/<?=$clan_msg_user['r']?>.png" alt=""> <?=$clan_msg_user['login']?><br>
<span class="grey"><?=_times(time() - $clan_msg['time'])?></span>
<div class="separ"></div>
<a class="grey" href="?clan_msg_read=true">Скрыть</a>
</div>
<div class="mini-line"></div>
<?
}
}else{
if(mysql_result(mysql_query('SELECT COUNT(*) FROM `clan_invite` WHERE `user` = "'.$user['id'].'"'),0) > 0) {
$_invite = mysql_fetch_array(mysql_query('SELECT * FROM `clan_invite` WHERE `user` = "'.$user['id'].'"'));
$clan_invite = mysql_fetch_array(mysql_query('SELECT * FROM `clans` WHERE `id` = "'.$_invite['clan'].'"'));
if($_GET['invite'] == $clan_invite['id']) {
mysql_query('INSERT INTO `clan_memb` (`clan`,`user`,`time`,`last_update`) VALUES ("'.$clan_invite['id'].'","'.$user['id'].'","'.time().'","'.(time() + ((60 * 60) * 24)).'")');
mysql_query('DELETE FROM `clan_invite` WHERE `user` = "'.$user['id'].'"');
header('location: /clan/');
exit;
}
if($_GET['cancel_invite'] == true){
mysql_query('DELETE FROM `clan_invite` WHERE `clan` = "'.$clan_invite['id'].'" AND `user` = "'.$user['id'].'"');
header('location: '.$_SERVER['PHP_SELF'].'?');
exit;
}
?>
<div class='block_light center'>
<b>Приглашение в клан</b><br/><br/>
<table cellpadding='0' cellspacing='0' align='center'>
<tr>
<td><img src='/images/icon/clan/gerb/1.jpg' alt='*'/></td><td valign='top' style='padding-left: 5px; text-align: left;'>
<img src='/images/icon/clan/<?=$clan_invite['r']?>.png' alt='*'/> <a href='/clan/<?=$clan_invite['id']?>/'><?=$clan_invite['name']?></a><br/>
В клане: <b><?=mysql_result(mysql_query('SELECT COUNT(*) FROM `clan_memb` WHERE `clan` = "'.$clan_invite['id'].'"'),0)?></b> человек<br/>
Бонус: <font color='#90c090'>+<?=clan_buff($clan_invite['built_1'])?></font> к сумме
</td>
</tr></table>
<div class='separ'></div>
<a href='?invite=<?=$clan_invite['id']?>'class='btn22'><span class='end'><span class='label'>Вступить</span></span></a><br/>
<a href='?cancel_invite=true'><font color='#909090'>Отказаться</font></a>
</div>
<?
}
}
//Колизей
if($_SERVER['PHP_SELF'] != '/coliseum.php'){
$member = mysql_query('SELECT * FROM `coliseum_member` WHERE `user` = "'.$user['id'].'" ORDER BY `time` DESC LIMIT 1');
$member = mysql_fetch_array($member);
if($member) {
$battle = mysql_query('SELECT * FROM `coliseum` WHERE `id` = "'.$member['battle'].'"');
$battle = mysql_fetch_array($battle);
if($battle['time'] > time() && mysql_result(mysql_query('SELECT COUNT(*) FROM `coliseum_member` WHERE `battle` = "'.$battle['id'].'"'),0) >= 2) {
echo "<div class='block_light center'>";
echo "<b class='dgreen'>Вы участвуете в битве</b><br>
<span class='grey'>До начала боя: ".($battle['time'] - time())." секунд</span>";
echo "<div class='separ'></div>";
echo "<a href='/coliseum/' class='btn22'><span class='end'><span class='label'>Перейти в колизей</span></span></a>";
echo "</div>";
}elseif($battle['start'] == 1 && $battle['end'] == 0){
echo "<div class='block_light center'>";
echo "<b class='dgreen'>Вы учавствуите в битве</b><br>
<span class='grey'>Бой начался!</span>";
echo "<div class='separ'></div>";
echo "<a href='/coliseum/' class='btn22'><span class='end'><span class='label'>Перейти в колизей</span></span></a>";
echo "</div>";
}
}
}
if($_SERVER['PHP_SELF'] != '/drakon.php'){
if($user['mp']>500){
if($user['hp']>50){
$aluko = mysql_fetch_assoc(mysql_query("SELECT * FROM `aluko` ORDER BY `id` LIMIT 1"));
if($aluko['health']>0){
echo '<center><div class="block_zero"><img src="/images/icon/minidrakon.png">Ужас! На нас опять напал Великий Демон!<img src="/images/icon/minidrakon.png"><br>
<a href="/drakon.php"class="btn22"><span class="end"><span class="label">
<img src="/images/icon/ok.png">Сразиться с драконом</span></span></a></div></center>
<center><font color="red">Награда </font></center>
<center><font color="red">до '.n_f($aluko["money"]).' золота!</font></center>';
echo"<div class='mini-line'></div>";
}
}
}
}
$hrevolt = mysql_fetch_assoc(mysql_query("SELECT * FROM `time_jurnal` WHERE `name`='revolt' ORDER BY `id` DESC LIMIT 1"));
if(($hrevolt['time'] - time()) < 900 && $hrevolt['time'] > time()) {
$h = ($hrevolt['time']-time())/3600%60;
$m = ($hrevolt['time']-time())/60%60;
$s = ($hrevolt['time']-time())%60;
?>
</br>Мятеж начнётся через: <font color='gren'><?php echo $h.':'.$m.':'.$s;?></font><br/><?
}
if($user['journal']>0){echo '<div class="mini-line"></div><div class="block_zero center"><a href="/journal.php"class="btn22"><span class="end"><span class="label"><span style="color: #3C3;">Новых оповещений: +'.$user['journal'].'</span></span></span></div></a>';}
}else{
?>
<div class='main' style='word-wrap:break-word;'><span style='text-shadow:none;'></span>
<?
}
//Проверка где находится игрок, так же не пускаем в бой ели меньше 150 хп
if($header=='Подземелье'){
mysql_query("UPDATE `metro_bands` SET `vbande`='yes' WHERE `user`='".$user['login']."' ");
if($user['hp']>150){mysql_query("UPDATE `metro_bands` SET `zhiv`='yes' WHERE `user`='".$user['login']."' ");}
else{
mysql_query("UPDATE `metro_bands` SET `zhiv`='no' WHERE `user`='".$user['login']."' ");}
}
else{
mysql_query("UPDATE `metro_bands` SET `vbande`='no' WHERE `user`='".$user['login']."' ");
}
if($header=='Подземелье бой'){
mysql_query("UPDATE `metro_bands` SET `vbande`='yes',`vboi`='yes' WHERE `user`='".$user['login']."' ");}
else{
mysql_query("UPDATE `metro_bands` SET `vboi`='no' WHERE `user`='".$user['login']."' ");}
//тут проверям не вышел ли игрок во время боя куда нибудь отсидется пока другие будут бить мобов,
// если вышел даём ему чупа-чупс заместо шмотки(это шутка такая можено изменить награду) так мы наказываем зайцев, халявщиков.
$moy_banda = mysql_fetch_array(mysql_query("SELECT * FROM `metro_bands` WHERE `user`='".$user['login']."' ")); //моя банда
$lide_bands = mysql_fetch_array(mysql_query("SELECT * FROM `metro_bands` WHERE `tip`='lider' AND `general_id`='".$moy_banda['general_id']."' ")); //лидер банды
//проверям создал ли лидер бой, и идёт ли бой
if($lide_bands['vboi']=='yes' && $lide_bands['vbande']=='yes')
{
//вот тут проверяем ели игрок жив и не в бою и в банде.
if($moy_banda['vbande']=='no' && $moy_banda['vboi']=='no' && $moy_banda['zhiv']=='yes'){
mysql_query("UPDATE `metro_bands` SET `nagrada`='Чупа-чупс', `nagrada_rozdana`='yes' WHERE `user`='".$user['login']."' ");
}
}
//тут проверяем время открытия подземки
$tsu = mysql_fetch_array(mysql_query("SELECT * FROM `metro_user_time` WHERE `user` = '".$user['login']."' AND `time`<'".time()."' "));
if($tsu!=0){mysql_query("DELETE FROM `metro_user_time` WHERE `user`='".$user['login']."' AND `time`<'".time()."' ") or die (mysql_error());}
$moya_banda = mysql_fetch_array(mysql_query("SELECT * FROM `metro_bands` WHERE `user`='".$user['login']."' "));
?>
<?
if($user) {
?>
<?
$gift = mysql_fetch_assoc(mysql_query("SELECT * FROM `user_podarok` WHERE `user_id` = '$user[id]' order by `last_auth` desc limit 1"));
$time = $gift['last_auth'] + 86400;
$now = time();
if ($time < $now) { ?>
<div class="title">Ежедневная награда</div>
<center><a class='button' href='/day.php/'>Забрать награду</a></center><? } ?>
<?
}
if($user['ua']=='Fly_DS104D/WAPBrowserProfile'){
echo'космодром успокойся уже';
exit;
}
?>